I Have Employee table having column name as ID,SALARY
how to get second max salary from employee table with id
ex
ID SALARY
1 20000
7 37000
2 5000
Answer Posted / belson gnana pradeep
Select Top 1 salary from (Select TOP 2 salary from tbl_salary order by salary desc)a order by salary
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
What is the user of Primary key?
Give a example to search fr a string in all stored procedure in sql server.
Write a query for primary key constraint with identity key word?
How do I create an extended event in sql server?
What are commonly used mssql functions in php?
Explain how to use linked server?
How to recover from sql injection? : sql server security
What is the usage of sign function?
Write a SQL queries on Self Join and Inner Join.
List the advantages of using stored procedures?
What is collation sensitivity? Explain different types.
How to divide query output into multiple groups with the group by clause in ms sql server?
Can we add a cpu to sql server?
How to get a list of all tables with "sys.tables" view in ms sql server?
Is it safe to delete log files?