how to retrive only second row from table in sql server
2000?
Answer Posted / jayaraman b
select min(emp_no) from
(select top 2 * from emp order by emp_no desc)A
--This will give you the 2nd largest Salaried employee
select max(emp_no) from
(select top 2 * from emp order by emp_no desc)A
--This will give you the 1st largest Salaried employee
Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
how will add additional conditions in sql?
What is the main difference between ‘between’ and ‘in’ condition operators?
Define candidate key, alternate key, and composite key.
What is usually the first word in a sql query?
How to test subquery results with the exists operator?
How to store and query spatial data?
Define self join in sql server joins?
How to convert a unicode strings to non-unicode strings?
What is a natural primary key?
What type of Index will get created after executing the above statement?
What are different replication agents and what's their purpose? : sql server replication
What are the export options of ssrs?
What are the steps to follow to configure SQL*Net?
Can you edit the .rdl code associated with a linked report?
What is stretch database in sql server?