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
List the data types available in mssql?
What are the limitations in ssrs on sql server express edition?
Can you explain the disadvantages/limitation of the cursor?
What are group functions in query statements in ms sql server?
Why does sql studio use a single registered database repository? : sql server management studio
What do you understand by integration services in sql server?
What are the disadvantages of using querystrings to send data from one page to another?
How to view the error log for any specific instance? : sql server database administration
How to use "if ... Else if ... Else ..." Statement structures in ms sql server?
What is triggers and stored procedures?
How to insert multiple rows with a subquery?
Help!!!!!!!!!!!! My database has gone offline, it is highlighted as 'Suspect'. Foolishly, i haven't got a recent back up. Is there a way of quickly restoring the database? Thank you
How to get a list of table columns using the "sp_columns" stored procedure in ms sql server?
What is 1nf 2nf and 3nf?
What is apply operator in sql?