find out the third highest salary?

Answer Posted / siddharth mitra

select *
from (select row_number() over (order by salary asc) as
"ROW_NUM" from emp)
where ROW_NUM = 3;

This only works with oracle 8i and 9i,i.e., row_number is an
analytic function.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How do I call oracle stored procedures that take no parameters?

570


What are the various constraints used in oracle?

556


How to rename an index?

590


What are the different oracle database objects?

588


How to create an oracle testing table?

596






How to grant create session privilege to a user in oracle?

574


What are the roles of dba?

614


What are the types of trigger in oracle?

577


What is coalesce function?

577


How can we delete duplicate rows in a table?

568


How to define a data source name (dsn) in odbc manager?

531


What is a system tablespace and when it is created?

563


How to upsert (update or insert into a table)?

541


What are the ways tablespaces can be managed and how do they differ?

1620


Will you be able to store pictures in the database?

642