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
how to present a past time in hours, minutes and seconds? : Sql dba
Why do we use sqlite?
Does truncate free space?
Explain sql data types?
What is primary and foreign key?
How do I save a stored procedure?
What do you understand by exception handling in pl/sql?
How do I create an index in word?
How do I write a cron which will run a sql query and mail the results to agroup?
What is sqlite used for?
What are all the common sql functions?
define data blocks ? : Sql dba
What is pl sql code?
How to rename a column in the output of sql query?
how to enter binary numbers in sql statements? : Sql dba