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
Why we use the openxml clause?
How do you migrate data from mssql server to azure?
How can we use ConnectorJ JDBC Driver with MS SQL?
How to find related tables in sql server?
Explain primary key, foreign key and unique key?
What is 5nf in normalization form?
Can you force a query to use a specific index?
What is not null constraint?
What is the meaning of sql server?
Give an example of why you would want to denormalize a database
What are the properties of sub-query?
How to identify current user in ssrs report?
How many databases instances are there in sql server 2000?
how to restart sql server in single user mode? How to start sql server in minimal configuration mode? : Sql server database administration
Explain error and transaction handling in sql server?