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 are different types of subquery?
What is join query?
How to use values from other tables in update statements in ms sql server?
Is it possible to update the views? If yes, how, if not, why?
How do you rename a table in sql server?
How to make a remote connection in a database?
What are the built in functions in sql server?
How to rebuild indexes with alter index ... Rebuild?
Why do we need normalization?
Explain different types of self contained sub query?
How many partitions a clustered index has by default in sql server 2012?
Explain in brief about Microsoft SQL server?
Can coalesce return null?
Describe and explain about SQL native client?
Relational calculus is what type of language?