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
what is the difference between count(*) and count(1) ?
Define self join?
What is the function of inner join?
What is Dependency Injection and provide example?
What is set nocount on?
how to create “alternate row colour”?
How to create function without parameter in sql server?
What are the differences between decimal and float in ms sql server?
What is inline variable assignment?
Can you explain what are the restrictions applicable while creating views? : SQL Server Architecture
What is the status of services on passive node for failover cluster in sql server? : sql server database administration
What is user-defined functions? What are the types of user-defined functions that can be created?
What happens if we shrink log file in sql server?
What types of replication are supported in sql server?
What are wait types?