write a query to find 4th max salary

Answer Posted / raj

for example if we take emp table:

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

Is This Answer Correct ?    3 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can you select everything, but 1 or 2 fields, without writer's cramp?

491


What is meant by user defined function?

575


How to create an array in pl/sql?

569


How to write pl sql program in mysql command prompt?

507


How do we use distinct statement? What is its use?

542






What is a sql instance vs database?

566


What type of database is sql?

610


What packages(if any) has oracle provided for use by developers?

5012


What is sql data?

540


what is the difference between undefined value and null value? : Sql dba

551


Explain autonomous transaction.

632


How do you run a query?

579


What is pl sql collection?

514


What is recursive stored procedure?

590


What is the difference between nested table and varray?

510