can anybody tell us, how to select 2nd max salary from
table.
my id is ashish.akk@gmail.com
Answer Posted / darshan shah
select top 1 * from (select top 2 * from emp order by sal
desc ) a order by sal asc
Plz try this.
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
What is conditional split?
Explain alternate key, candidate key and composite key in sql server?
Can we use max in where clause?
what is a sub-report?
What does select 1 mean?
Does index speed up select statements?
Can I run multiple instances of sql server 2000 at the same time on one computer?
Write the SQL query to drop, truncate and delete table.
You have several tables, and they are joined together for querying. The tables contain both clustered indexes and non clustered indexes to optimize performance, how should you distribute the tables and their indexes onto different file groups?
What is the difference between writing data to mirrored drives versus raid5 drives
what method you can use to reduce the overhead of Reporting Services data sources?
How do I view a stored procedure in sql server query?
What is cte (common table expression)?
Explain what are the authentication modes in sql server?
What is the difference between sql server 2000 object owner and sql server 2005 schema? : sql server database administration