find out the third highest salary?
Answer Posted / harmeet
Hi, this query will gives the third highest salary from table
select * from emp e
where 3 = (select count(sal) from emp
where e.sal < sal);
To dispay 5th highest salary, just change the number 3 to 5.
Like that we can find top N salaries.
I hope i'm not wrong.
| Is This Answer Correct ? | 44 Yes | 16 No |
Post New Answer View All Answers
How to login to the server without an instance?
How to execute the package in oracle?
Explain temporal data types in oracle
How to connect to the server with user account: sys?
What is tns service name?
How to rename an existing table?
is there a tool to trace queries, like profiler for sql server?
What is the order of defining local variables and sub procedures/functions?
What is the difference between $oracle_base and $oracle_home?
can anyody please send me the dump for Oracle 10g certifications for DBA path?
How to call a stored function with parameters?
How to define a data field as not null?
Explain the use of inctype option in exp command.
Difference between varchar and varchar2 data types?
I have some query regarding Report generation from Oracle Apps "PO module". I have to generate a report where table columns are as below: Vendor_name Invoice No PO Number Item_Quantity Value of Goods Date of Shipping Name_of_the_transport Date_of_receipt_issued. Now my questions is :from which table/column I can get the information of "Name_of_the_transport" column. Thanks in advance.