find out first highest salary?
Answer Posted / surya
select * from emp where &n-1=(select count(distinct sal)
from emp e where emp.sal<e.sal);
For example:-
If you enter n=1,it will display first highest salary
if you enter n=2,it will display second highest salary
......
if you enter n=nth,it will display nth salary
Is This Answer Correct ? | 9 Yes | 0 No |
Post New Answer View All Answers
What is the difference between $oracle_base and $oracle_home?
How to define a variable to match a table column data type?
How to use values from other tables in update statements using oracle?
How to store pictures on to the database?
What is merge in oracle?
Can we commit inside a function in oracle?
What is meant by joins?
Please explain compound trigger in oracle?
How to insert a record into a table?
What is the difference between I and G in Oracle?
What is transaction control statement and how many types of transaction control statement in Oracle?
Why packages are used in oracle?
What is a schema in oracle?
What is data type in oracle?
I have a parent program and a child program. I want to write a statement in Exception Block of the parent program so that when the statement in the exception block is executed, the control goes to the next statement in the parent block bypassing the child block.How do i do that?