find out the second highest salary?
Answer Posted / abhijit ramakant parb
select min(a.sal) from(select distinct d.sal from emp d
order by sal desc) a where rownum<=2;
To retrieve all columns
select * from emp where sal=(select min(a.sal) from(select
distinct d.sal from emp d order by sal desc) a where
rownum<=2);
Is This Answer Correct ? | 12 Yes | 6 No |
Post New Answer View All Answers
What is a subquery?
Explain about your project and its relation to the current job position you are applying to?
Database crashes. Corruption is found scattered among the file system neither of your doing nor of Oracles. What database recovery options are available? Database is in archive log mode.
What is the difference between formal parameters and actual parameters?
How to create a server parameter file?
What is the difference between a primary key & a unique key?
Difference between open_form and call_form in oracle.
what is partitioning? Types of partitioning. explain? what is the new kind of partitioning type introduced in 9i?
what are the advantages of running a database in archive log mode?
How to view the data files in the current database?
can u send the sql dumps to sivakumarr1987@gmail.com plz help me
What is a lookup table in oracle?
how to do daily transactions with out sql* loader control file regesterd in apps?
How to check the oracle tns settings?
What is the maximum limit on the number of columns in a table?