Answers for "how to select oddnumbers in sql"

SQL
0

select odd records sql

SELECT t.First, t.Last
FROM (
    SELECT *, Row_Number() OVER(ORDER BY First, Last) AS RowNumber 
            --Row_Number() starts with 1
    FROM Table1
) t
WHERE t.RowNumber % 2 = 0 --Even
--WHERE t.RowNumber % 2 = 1 --Odd
Posted by: Guest on November-08-2020
-1

find a even number sql

Select * from table where id % 2 = 0
Posted by: Guest on February-26-2021

Code answers related to "SQL"

Browse Popular Code Answers by Language