Find out the 3rd highest salary?

Answer Posted / jeevitha

select distinct a.salfrom emp a where &n= (select count
(distinct(b.sal)from emp b where a.sal<= b.sal)
-----
enter the highest sal of n:2,3.....n

Is This Answer Correct ?    1 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Is truncate ddl or dml?

545


What are primary key and foreign key and how they work?

554


What is #table in sql?

523


what is a record in a database ? : Sql dba

568


what is the different between now() and current_date()? : Sql dba

526






What is the difference between delete, truncate and drop command?

552


What is dynamic query?

542


how to write date and time literals? : Sql dba

532


What is trigger and how to use it in sql?

540


What is trigger and stored procedure in sql?

558


Can a key be both primary and foreign?

510


What is dense_rank in sql?

544


What is difference between joins and union?

533


Does truncate free space?

520


What is an escape character in sql?

566