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 / sivanandam
SELECT ID,MAX(SALARY) FROM EMP
WHERE SALARY < SELECT MAX(SALARY) FROM EMP
Is This Answer Correct ? | 6 Yes | 3 No |
Post New Answer View All Answers
How to list all stored procedures in the current database using ms sql server?
What is service broker?
What is difference between clustered index and non clustered index?
What is the difference between upgrade and migration in sql server?
What is normalization? Describe its different types.
Why normalization is used?
What is the Difference Between Primary and Foreign Key?
Explain Reporting Life Cycle?
How to replace the Query Result 'Null Value' with a text ?
Find columns used in stored procedure?
What is dbcc?
What is the difference between varchar and varchar(max) datatypes?
What is database dimension? : sql server analysis services, ssas
What is rolap and its advantage? : sql server analysis services, ssas
Explain about Joins?