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

How do you update sql?

711


How can check sql version from command line?

722


What is the purpose of design view?

727


What is a sql statement?

692


What is normalization sql?

719






Does pdo prevent sql injection?

698


what are the drivers in mysql? : Sql dba

736


What is a function in oracle pl sql?

724


Why do we use sql constraints? Which constraints we can use while creating database in sql?

726


How do I filter in sql profiler?

732


what are the differences between public, private, protected, static, transient, final and volatile? : Sql dba

739


Why do we use view in sql?

727


What are analytic functions in sql?

743


What is the difference between local and global temporary table?

756


Explain the difference in execution of triggers and stored procedures?

748