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
How to drop a tablespace?
Which dictionary tables and/or views would you look at to diagnose a locking issue?
How to load data through external tables?
What are group functions in oracle?
What are the different windows events activated at runtime ?
Give syntax for SQL and ORACLE joins.
How do I connect to oracle?
What is the difference between view and materialized view in Oracle?
How do I connect to oracle database?
i have a question here... As of my knowledge, when we apply an index (b-tree)on a column, internally it arranges the data in b-tree format and do the fetching process correspondingly... and my quetion is... How a bit-map index arranges the data internally when applied on a column?IS it in b-tree format or whatelse?
Can you have more than one content canvas view attached with a window ?
How to connect ms access to oracle servers?
What happens to the data files if a tablespace is dropped?
How to retrieve data from an cursor to a record?
What is the recommended interval at which to run statspack snapshots, and why?