find the third highest salary?

Answer Posted / srinath reddy

select * from emp e1 where 3 = (select count(*) from emp e2
where e1.salary <= e2.salary);

instead of answer we can say this as a solution where we can
find nth also

Is This Answer Correct ?    4 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is difference between sql function and stored procedure?

503


what is isam? : Sql dba

571


How is debugging done?

529


What is offset and limit in sql?

547


What is pl/sql table? Why it is used?

556






Which constraints we can use while creating database in sql?

609


what is sub-query? : Transact sql

596


What is graph sql?

524


What is a sql select statement?

562


Are left and right joins the same?

529


Is grant a ddl statement?

449


What is execution plan in sql?

544


What is sql in java?

543


Can we create index on primary key?

522


how many columns can be used for creating index? : Sql dba

514