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 an inner join sql?

549


What is sql character function?

546


Is it possible to link two groups inside a cross products after the cross products group has been created?

597


explain the options of myisamchk to improve the performance of a table. : Sql dba

549


What pl/sql package consists of?

638






Explain spool.

691


What are stuff and replace function?

575


what is a table in a database ? : Sql dba

546


What is a primary key sql?

565


Does sql*plus also have a pl/sql engine?

563


what are the differences between char and varchar? : Sql dba

529


what is 'mysqlimport'? : Sql dba

574


What are data types in pl sql?

565


Are stored procedures faster than queries?

524


How do I view an execution plan in sql?

533