Write a query to get 2nd maximum salary in an employee table ?
Answer Posted / sushma
SELECT * from
(SELECT * FROM emp ORDER BY sal DESC)
WHERE rownum <= 2
MINUS
SELECT * from
(SELECT * FROM emp ORDER BY sal DESC)
WHERE rownum < 2
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
Can a foreign key be a duplicate?
what is auto increment? : Sql dba
How many types of cursors supported in pl/sql?
What does joining a thread mean?
what is single byte over head in oracle..?
What is rownum in sql?
What is trigger and how to use it in sql?
What is localdb mssqllocaldb?
what is the use of anchoring object? what r the difference between anchoring object & enclosing object? can any one tell me all the details?
What is where clause in sql?
what is union, minus and interact commands? : Sql dba
List different type of expressions with the example.
What is the difference between execution of triggers and stored procedures?
How does postgresql compare to mysql?
How do you use join?