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
Oracle Database
ODD ROWS
EVEN ROWS
To fetch even records
To fetch odd records
for SQL > odd:
for SQL > Even:
and
Here’s a simple and straightforward answer to your question, (I think). I am using the TSQL2012 sample database and I am returning only even or odd rows based on “employeeID” in the “HR.Employees” table.
Return only Even numbers of the employeeID:
Return only Odd numbers of the employeeID:
Hopefully, that’s the answer you were looking for.
odd number query:
even number query: