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
How to defragment indexes with alter index ... Reorganize?
What is side by side migration in sql server?
Why we need to use secondry database file? though, we can do same work using primary database file also.
Can foreign key be duplicate?
How to read data in a table with "select" statements?
Explain in brief about Microsoft SQL server?
Difference between primary key and clustered index?
What is difference between inner join and join?
List the various tools available for performance tuning?
How to rebuild master databse?
How to grant a permission in ms sql server using "grant execute" statements?
How data can be copied from one table to another table?
How to create a simple stored procedure in ms sql server?
Explain raiserror in sql server?
Explain Normalization and DE normalization