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 / bennison terry
Select Top 1 * from Tbl_Salary where ID not in (Select top 1 ID from tbl_salary order by salary desc) order by Id desc
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
Can you roll back the ddl statement in a trigger?
What is difference between oltp and olap?
What are the types of joins in sql?
How to check table values in sql server?
Why do we use sql limitations? Which constraints can we use while making a database in sql?
What is parameterized reports in ssrs ?
What is resource governor in sql server?
Which are the new data types introduced in sql server 2008?
How to copy data from one table to another table?
What is data modeling and Reterminal integrity?
What is difference between index and primary key?
Tell me about the approaches which you used to counter the DI problems.
List out the different types of locks available in sql server?
What is merge statement?
What are the properties of the transaction?