i have a table MEN in sql server 2008 that contain 150 rows.
how i can show only the even or only the odd rows ?
thank's in advance
i have a table MEN in sql server 2008 that contain 150 rows.
how i can show only the even or only the odd rows ?
thank's in advance
Check out ROW_NUMBER()
Assuming your table has auto-numbered field "RowID" and you want to select only records where RowID is even or odd.
To show odd:
To show even:
For even values record :
For odd values record:
Try following