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 materialized view in Oracle?
What is define in oracle?
What is index in Oracle?
How do I limit the number of oracle database connections generated by weblogic server?
How to load a large xml file?
How do I find the database name in oracle?
How can Oracle users be audited?
while i take backup using ibm tsm the following errors occurred: rman-03009 ora-19513 ora-27206 ora-19502 ora-27030 ora-ora19511
What are named parameters?
What happens if the update subquery returns multiple rows?
Why do I get java.lang.abstractmethoderror when trying to load a blob in the db?
How can I introduce multiple conditions in like operator?
What happens to the indexes if a table is recovered?
Is there any function in oracle similar like group_concat of mysql?
What is an oracle and why it is used?