1.

Write a query to get all even and odd number if we have some id column?

Answer»

Write a query to GET all even and odd number if we have some id COLUMN?
Below is the query to get all even number of RECORDS from SQL table.

SELECT * FROM TABLE_NAME WHERE ID % 2 = 0

And BELOS is the query to get all odd number of records from table.

SELECT * FROM TABLE_NAME WHERE ID % 2 != 0



Discussion

No Comment Found