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
Explain having clause and where clause?
how can you select rexcord(rows) from table A which is not present in Table B . Id being the FK in Table B referencing to ID Table A
What are the grouping functions?
What are the new features of sql server 2008 r2 reporting service?
How to stop log file growing too big?
How to enter date and time literals in ms sql server?
Can a table have 2 primary keys?
What is difference statement and preparedstatement?
What is the difference between clustered and a non-clustered index?
How we can refresh the view?
How to rebuild master databse?
What is a unique index?
What is the optimal disk configuration for a database server and what raid configurations would you use if budget is not a constraint?
Explain the properties of sub-query in sql server?
What command do we use to rename a db, a table and a column?