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
What is sub query and its properties?
What is the difference between a fill factor of 100 and 0?
What does this statement do @@rowcount?
What is built-in function?
What are the types of ssrs?
What is cursors? And what are the different types of cursor?
What are the differences between clustered and non-clustered index?
your distribution database is full what will u do
What is the difference between online clustering and Offline clustering?
How to enter binary string literals in ms sql server?
How to execute stored procedure in select statement sql server?
You have to store user responses of ‘yes’ and ‘no’ what kind of data type is best suited for this task?
Which is the latest version of sql server and when it is released?
What is difference between sql and sql server?
How do triggers work?