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
Why people hate cursor?
Write a program using SQL queries to find a unique entry in a table.
New concepts of sql server 2005 use in your project.
What do you mean by acid?
What are the export options of ssrs?
What function does a database engine serve in the sql server?
What is a linked server in sql server?
What is catalog views?
What do you mean by sql server agent?
What is transact-sql ddl trigger?
Can a stored procedure call itself or recursive stored procedure? How much level sp nesting is possible?
What is nonclustered index with included columns ?
Can we call future method from trigger?
What is trigger and different types of Triggers?
How to create new tables with "create table" statements in ms sql server?