how to check the 3rd max salary from an employee table?

Answer Posted / ar

select c.emp_id,c.salary from (select rownum as
rn1,c.emp_id,c.salary from (select * from table_name ORDER
by salary DESC) b) c
where c.rn1 = n --(n=3)

Is This Answer Correct ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is record type in pl sql?

646


What is right join in sql?

639


How do I truncate a word?

613


When you have to use a default "rollback to" savepoint of plvlog?

811


What are the advantages of pl sql over sql?

637






What is embedded sql in db2?

612


explain mysql aggregate functions. : Sql dba

640


Explain the savepoint statement.

691


Is sql a backend?

648


Can you inner join the same table?

617


Are views faster than queries?

641


How do I clear the screen in sql plus?

667


What is integrity in sql?

660


What is the use of count (*) in sql?

644


What are the different sql commands?

623