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 many bits ip address consist of? : Sql server database administration
How will you find out if there are expensive SQL statements running or not?
What are the mathematical functions supported by sql server 2005?
What is the difference RDBMS and Graph Database?
What are the differences between ms sql server & oracle?
Write an sql query to find first weekday of the month?
Can a cursor be updated? If yes, how you can protect which columns are updated?
What will be the maximum number of indexes per table?
how many clustered indexes can be created on a table? : Sql server database administration
You are designing a strategy for synchronizing an SQL Azure database and multiple remote Microsoft SQL Server 2008 databases. The SQL Azure database contains many tables that have circular foreign key relationships?
When is the use of update_statistics command?
What is the contrast between sql and pl/sql?
What are the differences between stored procedure and view in sql server?
How do I start sql server?
How to disconnect from a sql server using mssql_close()?