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
What is a recursive stored procedure in sql server?
What are views used for?
1. Tell me your daily activities 2. If sql server installation fails at time installation what will do 3. Where does the sql server installation log details are stored 4. After the installation what will you do for memory configuration 5. What is the difference between SQL max maximum memory and AWE memory 6. How will you configure AWE memory 7. How will setup an email alert for the backup job 8. After the SQL installation what are the jobs will you configure 9. What does –g mean in the sql startup parameter 10. What is the difference between Bulked log and Full recovery model 11. What is the difference between mirroring and log shipping 12. What are the steps to be followed before in-place up gradation 13. After installing the patch the sql server does not start and application team tells to rollback the changes .In this scenario what will you do
What is the difference between an index and a unique index?
Explain syntax for dropping triggers?
How to insert multiple rows with one insert statement in ms sql server?
How to replace the Query Result 'Null Value' with a text ?
How to copy the tables, schema and views from one sql server to another?
What is difference between rollback immediate and with no_wait during alter database?
How can we delete a table in sql server?
What is a database in ms sql server?
What is the difference between system objects and user objects?
How to configure and test odbc dsn settings?
Is null vs coalesce?
How many servers can we create in a single subscription?