Find out the 3rd highest salary?

Answer Posted / abhay

select distinct(sal) from emp a where 3=(select
count(distinct(sal) from emp b where a.sal<=b.sal);


somebody tell me he logic....!

Is This Answer Correct ?    6 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Inline the values in PL/SQL, what does it mean.?

621


what is 'mysqladmin' in mysql? : Sql dba

524


Does sql full backup truncate logs?

522


Which are the different character-manipulation functions in sql?

540


What does fetching a cursor do?

610






how can we destroy the cookie? : Sql dba

549


what are local and global variables and their differences? : Sql dba

528


Mention what pl/sql package consists of?

528


What is a subquery in sql?

497


What is the source code of a program?

500


how to check server status with 'mysqladmin'? : Sql dba

554


What is the difference among union, minus and intersect?

537


What is the need of a partition key?

529


Why is %isopen always false for an implicit cursor?

560


How many rows can sqlite handle?

576