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 Command line parameters in PLSQL.?
Explain difference between cross join and full outer join?
What is master database? : SQL Server Architecture
What happens if null values are involved in arithmetic operations?
What is the stuff and how does it differ from the replace function?
Explain what are the different index configurations a table can have?
Can we return Data from 4(more than 1) tables in stored procedure?
In what sequence sql statement is processed?
Explain what is use of dbcc commands?
What is the process of normalization?
What is query cost in sql server?
What is truncate table?
explain different types of joins? : Sql server database administration
Why olap is used?
Explain error and transaction handling in sql server?