select odd records sql

Solutions on MaxInterview for select odd records sql by the best coders in the world

showing results for - "select odd records sql"
Emily
25 Feb 2017
1SELECT t.First, t.Last
2FROM (
3    SELECT *, Row_Number() OVER(ORDER BY First, Last) AS RowNumber 
4            --Row_Number() starts with 1
5    FROM Table1
6) t
7WHERE t.RowNumber % 2 = 0 --Even
8--WHERE t.RowNumber % 2 = 1 --Odd
9