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
What is a data collection table?
What is side by side migration in sql server?
Explain full-text indexing?
Explain the flow of creating a cube? : sql server analysis services, ssas
What is difference between delete & truncate commands?
What is data set in report?
Find columns used in stored procedure?
What stored procedure would you use to view lock information?
What are entities and relationships?
What happens if null values are involved in boolean operations?
What is 2nf normalization?
How use inner join in sql server?
How do use Having,Group by,Group function in SQL?
Explain the working of sql privileges?
What is a natural primary key?