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 the full form of ddl?
What is a mutating table error and how can you get around it?
after migrating the dts packg to ssis by using migrtn wizrd in 2005. iam not able to open ssis pack and getting error. what r those errors? how to resolve?
What are wait types?
How to enter unicode character string literals in ms sql server?
Describe how to use the linked server?
How to achieve Paging of records in SQL SERVER?
Is there any difference between the primary key and unique key?
how to take backup bcp out for a column in table in sql server?
Explain about unique identifier data type in sql server?
Where can you find the error log information? : sql server database administration
What is temporal data type?
how can you select rexcord(rows) from table A which is not present in Table B . Id being the FK in Table B referencing to ID Table A
What are the restrictions applicable while creating views? : SQL Server Architecture
hi, how to link a text file and a .rpt file in my tables of sql server and to retrieve those records for further use. reply me as soon as possible.