from the table display the 2nd highest salary?
and also the least 2nd salay?
Answer Posted / sridhar sahoo
select distinct top 1 salary from payroll..emp where salary
in(select distinct top N salary from payroll..emp order by
salary desc)
if u want top 2 put 2 at the pacece of N
if u want top 5 put 5 at the pacece of N
if u want ..............................
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
What is 3nf normalization?
How to change the ownership of a schema in ms sql server?
What is mean by candidate key?
What is b tree index?
as a general practice, it is recommended to have dbo be the owner of all database objects however, in your database you find number of tables owned by a user other than dbo, how could you fix this? : Sql server administration
Can group functions be mixed with non-group selection fields in ms sql server?
What are the general features of sql server management studio? : sql server management studio
what are different types of backups available in sql server? Given a particular scenario, how would you go about choosing a backup plan? : Sql server database administration
How many databases Microsoft SQL server provides?
Does server sql treat char as a variable-length or fixed-length column?
Do you know what is fill factor and pad index?
What are various ways to enhance the ssrs report?
What is difference between inner join and join?
What is the meaning of resultset type_scroll_insensitive?
What is the difference between clustered and non-clustered indexes in ms sql server?