how to write the query to select the rows are in the order
of either 1,3,5,7... or 2,4,6,8,...
Answer Posted / md. niyaz
For: 2, 4, 6, ......
select * from <Table_Name> where <Column_Name> % 2 = 0
==============Niyaz====================================
For: 1, 3, 5, ......
select * from <Table_Name> where <Column_Name> % 2 = 1
| Is This Answer Correct ? | 3 Yes | 1 No |
Post New Answer View All Answers
What is the osql utility?
How do I view a stored procedure in sql server query?
What is difference between equi join and natural join?
What are the different types of replication are there in sql server 2000?
Explain a checkpoint?
Can you leave a union at any time?
What is the difference between dbcc indexdefrag and dbcc reindex?
What are types of subqueries?
How to transfer data from a cursor to variables with a "fetch" statement?
If user is owning any SQL Objects, can we drop that user
Define synonym?
How to use old values to define new values in update statements in ms sql server?
Explain what is dbcc?
What is tcl in sql server?
What is the difference between count () and rowcount ()?