Answer Posted / meher
SELECT SAL FROM EMP A WHERE &N= (SELECT COUNT(DISTINCT) SAL
FROM EMP B WHERE A.SAL<B.SAL)
--Pass the value for N as 2 to get 3rd highest salary.
--pass 0 for highest sal,1 for 2nd highest,2 for 3rd
highest and so on....
Is This Answer Correct ? | 6 Yes | 6 No |
Post New Answer View All Answers
what is transaction? : Sql dba
What are the events on which a database trigger can be based?
Is sql low level language?
what is normalization? : Sql dba
Can we use join in subquery?
Can we call stored procedure in function?
What is an exception in pl/sql?
What is materialized view. What are different methods of refresh?
How to read xml file in oracle pl sql?
What is minus?
Is sql better than access?
What is a record in a database?
how to calculate the difference between two dates? : Sql dba
What is 19 null in sql?
When sql appeared?