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 primary use of the model database? : Sql server administration
Due to some maintenance being done, the sql server on a failover cluster needs to be brought down. How do you bring the sql server down?
How to retrieve error messages using odbc_errormsg()?
Do you know what is recursion? Is it possible for a stored procedure to call itself or recursive stored procedure?
Is null vs coalesce?
Explain the working of sql privileges?
how can u get last observation in an unknown dataset ?
What do you mean by authentication modes in sql server?
What are the system database in sql server 2008?
Differentiate between mongodb vs. Sql server?
Explain different types of locks in sql server.
Explain having clause?
What is openrowset sql server?
What is normalization and denormalization in sql server?
Explain log shipping?