can anybody tell us, how to select 2nd max salary from
table.
my id is ashish.akk@gmail.com
Answer Posted / sabin v jacob
SELECT Min(Sal) FROM (SELECT TOP 2 Sal FROM emp ORDER BY
Sal desc) as Temp
or
SELECT Min(Sal) FROM emp WHERE Sal IN(SELECT TOP 2 Sal FROM
emp ORDER BY Sal DESC)
Is This Answer Correct ? | 5 Yes | 3 No |
Post New Answer View All Answers
what’s the difference between Covering Indexes and Clustered Indexes ? how to use clustered index small ?
What is change data capture (cdc) feature?
What does it mean to normalize data?
What is a view and what are its advantages?
Can you create a logon trigger in sql server 2005 express edition?
Explain different types of BACKUPs avaialabe in SQL Server? Given a particular scenario, how would you go about choosing a backup plan?
What is not null constraint?
Explain trigger classes i.e. Instead of and after trigger?
What is normalization and its types?
Is it safe to delete log files?
What is the command used to check locks in microsoft sql server?
you accidentally delete the msdb database what effect does this have on your existing sql databases, and how do you recover? : Sql server administration
What is difference between rownum and row_number?
write an SQL query to list the employees who joined in the month of January?
What are synonyms?