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 stored by the model?
Can we insert data into a view?
Where sql server usernames and passwords are stored in a sql server?
What is the usage of the sign function?
Should you normalize audio?
What is bulkcopy in sql?
What is it unwise to create wide clustered index keys?
What is a primary key?
Can you use order by when defining a view?
Can primary key be a foreign key?
How to create a Master database in SQL server ?
Can we create clustered index on composite key?
How will you decide the active and passive nodes?
You want to check the syntax of a complicated update sql statement without executing it. What command should you use?
What is the query and subquery?