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

What is a function in oracle pl sql?

546


What is mdb stand for?

558


When is the update_statistics command used?

574


what is the difference between char_length and length? : Sql dba

574


How to make a copy values from one column to another in sql?

579






How many sectors are in a partition?

564


What is pl sql collection?

527


How do I run a sql query?

532


is mysql query is case sensitive? : Sql dba

565


How can I see all tables in sql?

548


Which sorts rows in sql?

587


what is sql server agent? : Sql dba

605


How can we optimize a sql query?

578


What is a dirty read sql?

487


Can a varchar be a primary key?

538