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
Explain different types of collation sensitivity?
explain different types of constraints? : Sql server database administration
What is bit data type? What's the information that can be stored inside a bit column?
Explain what is the difference between a local and a global temporary table?
Do you know exporting and importing utility?
Which tcp/ip port does sql server run on? How can it be changed?
How can sql server instances be hidden? : sql server security
Can we use where and having clause together?
What are the differences between “row_number()”, “rank()” and “dense_rank()”?
How to create a simple table to test triggers in ms sql server?
how we use window authentication connection with sql server.?
can you implement data mining in SSRS?
What are the advantages of sql azure?
Is it safe to delete log files?
What are the properties of the relational tables?