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 / tiru
select * from
(select emp.ename, emp.age, (rownum+1) AS XX from employee
emp )
where remainder(XX,2) = 0;
select * from
(select emp.ename, emp.age, (rownum+1) AS XX from employee
emp )
where remainder(XX,2) = 1;
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
Can foreign key be duplicate?
How to download and install the scaled-down database adventureworkslt?
Explain about SQL server 2005?
What are Spatial data types in SQL Server 2008
What is the difference between join and inner join?
How much does sql server 2016 cost?
what are the new features in SSRS?
Do you know what is similarity and difference between truncate and delete in sql?
How to list all user names in a database?
What is sql sandbox in sql server?
What is difference between delete & truncate commands?
Tell me what is the order in which the sql query is executed?
What are system databases in ms sql server?
Explain about thread and memory management process of SQL?
What is “begin trans”, “commit tran”, “rollback tran” and “savetran”?