find out the third highest salary?
Answer Posted / haneef
Best One
select top 1 * from test_emp where sal in (select top 3 sal
from test_emp order by sal desc) order by sal asc
or
It also work
select top 1 * from test_emp where sal in (select top 3 sal
from test_emp order by sal desc) order by sal asc
select top 1 MAX(sal),id from test_emp where sal < (select
max(sal) from test_emp where sal < (select max(sal) from
test_emp))
group by id,sal order by sal desc
| Is This Answer Correct ? | 0 Yes | 1 No |
Post New Answer View All Answers
Which environment variables are absolutely critical in order to run the OUI?
Why do we use bulk collect in oracle?
What are the differences between number and binary_float in oracle?
What happens to the current transaction if the session is killed?
If youre unsure in which script a sys or system-owned object is created, but you know its in a script from a specific directory, what UNIX command from that directory structure can you run to find your answer?
How to rename an existing table?
What are the general rules on data consistency?
Is there any function in oracle similar like group_concat of mysql?
How to delete an existing row from a table in oracle?
What is private procedure oracle?
How to assign values to data fields in record variables?
What to do if the startbd.bat failed to start the xe instance?
Is rowid unique in oracle?
can anyody please send me the dump for Oracle 10g certifications for DBA path?
What is rowid and rownum in oracle?