How can you select all the even number records from a table? All the odd number records?

asked in Database Questions by
0 votes

1 Answer

answered by

To select all the even number records from a table:

Select * from table where id % 2 = 0 

To select all the odd number records from a table:

Select * from table where id % 2 != 0
0 votes
...