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 do I find the default sql server instance?
What are the types of indexes?
Can you please differentiate between a primary key and a unique key?
What is the difference between a function and a stored procedure?
How to replace the Query Result 'Null Value' with a text ?
When would you use it?
State the difference between local and global temporary tables?
What is pivot and unpivot?
Can sql server be linked with other servers like oracle?
What are actions, how many types of actions are there, explain with example? : sql server analysis services, ssas
Explain what is raid and what are different types of raid levels?
Mention the different authentication modes in sql server.
Explain index in sql server?
Explain the properties of a relational table?
Explain about sql server login?