write a query to find 4th max salary

Answer Posted / raj

for example if we take emp table, the query like this...
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 ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can we use pl sql in mysql?

509


Is it possible to sort a column using a column alias?

599


What is multiple columns?

567


what are the t string functions available in tsql? : Transact sql

533


How to combine two stored procedures in sql?

585






What are joins in sql?

529


How many disk partitions should I have?

542


Is sqlite good enough for production?

525


What is mutating error in pl sql?

536


Can a view be mutating? If yes, then how?

568


How many types of privileges are available in sql?

730


What is a sql schema used for?

536


What is sql indexing?

540


What is pl sql and why it is used for?

565


What is the difference between sql and t sql?

531