can anybody tell us, how to select 2nd max salary from
table.
my id is ashish.akk@gmail.com
Answer Posted / dhaval
we have to use distinct key word there is a possibility
that two person having same salary.
select top 1 sry from (select distinct top 2 sry from emp
order by sry desc)t1 order by sry asc
| Is This Answer Correct ? | 1 Yes | 1 No |
Post New Answer View All Answers
How to implement one-to-one, one-to-many and many-to-many relationships while designing tables?
What stored procedure would you use to view lock information?
Explain different types of BACKUPs avaialabe in SQL Server? Given a particular scenario, how would you go about choosing a backup plan?
What does the update command do?
Name the different type of indexes in sql?
How do you Implement SSIS Packages in your Project?
How to use subqueries with the in operators in ms sql server?
What is transaction server isolation?
It is important form e to get the information from log files of applications executed by the task scheduler? Does sql studio save these log files? : sql server management studio
State the difference between union and union all?
While using a cursor, how can you differentiate between a deleted row and a row that has been inserted with null data values?
What do you understand by triggers?
Ms sql server index?
What is resource db in sql server?
What is etl - extraction, transformation, and loading?