from the table display the 2nd highest salary?
and also the least 2nd salay?
Answer Posted / narayana
select top 1 sal from (
select top 2 sal from Emp order by sal desc) as a order by sal asc
select top 1 sal from(
select top 2 sal from Emp order by sal ) ss order by sal desc
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
How to update values in a table with update statements in ms sql server?
What happens if date-only values are provided as date and time literals?
Why use “pivot” in sql server?
How do I start sql server 2017?
How ssrs maintain security?
How to implement service broker?
What is sql server 2000 work load governor?
Explain the concept of recursive stored procedure.
What stored by the tempdb ? : sql server database administration
Mention the command used to rename the database.
What is difference between drop truncate and delete?
What are database states in ms sql server?
What is set nocount on and what is set nocount off?
What are the benefits of normalization?
What do you understand by a view?