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
What is function of master database?
can a table be moved to different filegroup? : Sql server administration
What is an inner join?
Do you know what is raid and what are different types of raid configurations? : SQL Server Architecture
What is nonclustered index with included columns ?
What are date and time data types in ms sql server?
Is oracle faster than sql server?
When setting replication, is it possible to have a publisher as 64 bit sql server and distributor or subscribers as a 32 bit sql server?
What is a hint?
Write a SQL query to make a column as unique?
What is the difference between row_number and dense_rank?
What is difference between equi join and natural join?
Do you know nested transaction?
Can a table have 2 foreign keys?
Explain about unique identifier data type in sql server?