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 ecc 6.0
How to list all tables in your schema?
Which is better Oracle or MS SQL? Why?
What is the quickest way to fetch the data from a table?
How to define a data source name (dsn) in odbc manager?
How to assign values to variables?
What is tns entry?
Explain the use of file option in exp command.
How do I escape a reserved word in oracle?
How do I connect to oracle?
How can we force the database to use the user specified rollback segment?
What is a subquery in oracle?
Where do you use decode and case statements?
what is partitioning? Types of partitioning. explain? what is the new kind of partitioning type introduced in 9i?
What is a schema in oracle?