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
Can sql servers linked to other servers?
How to use user defined functions in expressions?
How to concatenate two character strings together?
Where are sql server user names and passwords stored in sql server?
Explain the ways to controlling cursor behavior?
How can we use ConnectorJ JDBC Driver with MS SQL?
How to recreate an existing index in ms sql server?
What is federation member?
What is join and name different type of joins?
What is use of attributehierarchyenabled? : sql server analysis services, ssas
What is bcp? When does it used?
How is sql used in sql server?
How can we remove orphan records from a table?
What are joins in sql and what are the different types of joins?
How to create percentile function?