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
State any two functions of oracle?
How do I spool to a csv formatted file using sqlplus?
what is IDE,DMV in sql server?
How to rename a tablespace in oracle?
How to fetch the row which has the max value for a column?
Does oracle database need java?
What is rich query?
How many categories of data types in oracle?
how can db_files > maxdatafiles since db_files is for instance and the later is for database
What happens if variable names collide with table/column names?
what is dynamic SGA and static SGA
What is bulk copy or bcp in oracle?
What are the differences between primary key and unique key?
What is a cursor variable?
Explain the importance of .pll extension in oracle?