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 / vijayplsql@gmail.com
For 1,3,5,7...
select * from emp where (rowid,1) in (select rowid,mod
(rownum,2) from emp);
For 2,4,6,8,...
select * from emp where (rowid,0) in (select rowid,mod
(rownum,2) from emp);
Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
what is a join? : Sql server database administration
What are diverse clauses that form a part of sql?
What is self contained sub query?
What are types of storage modes? : sql server analysis services, ssas
What does set rowcount do?
What are the key configuration files for sql server reporting services ?
what is the difference in login security modes between v6.5 and 7.0? : Sql server database administration
What is a database table?
How can we remove orphan records from a table?
What is a recursive stored procedure in sql server?
Tell me something about security and sql azure?
Explain datetime2 data type in sal server 2008?
What is row_number () and partition by in sql server?
Explain about Views?
What is the syntax for encrypting a column in SQL Server?