find out the second highest salary?
Answers were Sorted based on User's Feedback
Answer / padiya hiten
select * from emp e1 where (3=(select count(distinct
(e2.sal))from emp e2 where e2.sal>=e1.sal));
| Is This Answer Correct ? | 4 Yes | 6 No |
Answer / sumeet
select min(sal) from emp where sal in (select top 2 sal from
emp order by sal desc);
| Is This Answer Correct ? | 0 Yes | 3 No |
Answer / shachindra pandey
proc sql;
select id,name,population from populations where
population=(select max(population) from
populations
where population < (select max(population) from
populations));
quit;
| Is This Answer Correct ? | 18 Yes | 22 No |
Answer / tejinder
select salary from emp order by salary desc limit 0,1;
| Is This Answer Correct ? | 0 Yes | 5 No |
How to unlock the sample user account in oracle?
Can a formula column referred to columns in higher group ?
What is a static data dictionary in oracle?
What happens if recursive calls get out of control?
Can group functions be mixed with non-group selection fields?
How to list all user accounts in oracle?
How are the index updates?
What is oracle rowcount?
What is a tns service name?
what is partitioning? Types of partitioning. explain? what is the new kind of partitioning type introduced in 9i?
Explain about the analyze command in oracle?
How many types of table in Oracle?