how to find the second highest salary from emp table?
Answer Posted / neeraj
SELECT DISTINCT(SAL) FROM EMP
WHERE SAL=(SELECT MIN(SAL) FROM (SELECT SAL FROM EMP ORDER
BY SAL DESC)
WHERE ROWNUM<=2);
| Is This Answer Correct ? | 2 Yes | 2 No |
Post New Answer View All Answers
Why is there a need for sqlcode and sqlerrm variables?
what is a stored procedure? : Sql dba
Can ddl statements be used in pl/sql?
Explain the difference between drop and truncate commands in sql?
How to rename a column in the output of sql query?
How you can copy a file to file content and file to pl/sql table in advance pl/sql?
what is a tablespace? : Sql dba
What is gpt format?
What is mutating error?
What is sql prepared statement?
Explain foreign key in sql?
How bulk collect improves performance?
What is plpgsql language?
What are the possible values for the boolean data field?
What is pivot in sql?