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
how to code performance tuning of oracle PL/SQL? can any body send me the perfect answer?
How to update a table row with a record?
What is the difference between truncate & delete command?
How translate command is different from replace?
What is the fastest query method to fetch data from the table?
What view(s) do you use to associate a users SQLPLUS session with his o/s process?
What does sharding mean?
What happens to indexes if you drop a table?
How to find the duplicate rows count from employees table in oracle?
What is MTTR advisor in Oracle?
Does facebook use oracle?
How to best split csv strings in oracle 9i?
How to connect to a local oracle 10g xe server?
when we are importing items in inventory, showing errors, Oracle support suggested us for running scripts & also suggested if we run scripts, iprocurement applicaation if is there it will show shared and if we go in future for iprocurement, it wont work. So kinldy suggest any functional solution.
How do I call oracle stored procedures that take no parameters?