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 a functions and types in sql server?
What are the differences between sql server and mysql.
How to download and install microsoft .net framework version 2.0?
What is the maximum row of a size?
What is the difference between a "where" clause and a "having" clause?
What is ddl and dml commands?
How to write character string constants or literals in ms sql server?
What is the meaning of resultset type_scroll_insensitive?
What are the differences between having and where clause.
code to create procedure for taking databse backup in sql server or i have the query for it but what it's query returns means i want to show on my jsp that the databse backup has been taken on the basis of that return value.does it returns 0 or 1.wat is the code for that
Do you know what is a with(nolock)?
How you trouble shoot when any job fails
Define tool Manage Statistics in SQL Server 2000 query ?
What is indexed view? How to create it?
Difference between connected and disconnected database in .net with sql server?