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 the difference between push and pull subscription? : sql server replication
What is stored procedures?
What is SQL Azure Fabric?
What is the osql utility?
What is the difference between drop table and truncate table?
Can you leave a union at any time?
What are the advantages of using a stored procedure?
Can you name a few encryption mechanisms in sql server?
How do you delete a trigger?
How optimize sql query with multiple joins in sql server?
How to provide values to stored procedure parameters in ms sql server?
As a general practice, it is recommended to have dbo be the owner of all database objects however, in your database you find number of tables owned by a user other than dbo, how could you fix this?
How do I uninstall sql server 2014?
What are SSL and TSL protocols?
What are the fixed server level roles? : sql server security