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
What is cached report?
Please explain what is “asynchronous” communication in sql server service broker?
How to find out the list schema name and table name for the database?
What is the stuff and how does it differ from the replace function?
Is ssrs support other database except ms sql server?
What is a bit datatype?
How can we use ConnectorJ JDBC Driver with MS SQL?
what is the information that can be stored inside a bit column? : Sql server database administration
What happens if strings are casted into wrong code pages in ms sql server?
What is the difference between DATETIME2 and DATETIME?
Explain partitioned view?
How do you check sql server is up and running?
Is it possible for a stored procedure to call itself or recursive stored procedure? How many levels of sp nesting are possible?
What’s the distinction between dropping a info and taking a info offline?
What does normalization do to data?