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 / vijay sultampur
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 ? | 7 Yes | 0 No |
Post New Answer View All Answers
Describe the left outer join & right outer join. : sql server database administration
What is the maximum number of instances in 32 bit and 64 bit sql server 2012?
How to delete duplicate records based on single column from a table?
 Explain what is sql override for a source taLle in a mapping?
What are sub reports and how to create them?
What is the datatype of rowid?
What is update locks?
What is data set in report?
Tell me what are cursors and when they are useful?
What is inline variable assignment?
If no size is defined while creating the database, what size will the database have?
What is forward - only cursors / read only cursor?
You want to generate a report that is formatted as a chart. Can you use the report wizard to create such a report?
What is mssql?
When would you prefer to have a minimum number of indexes?