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 convert characters to dates in oracle?
Explain the features of oracle?
What is a snapshot log?
What is clusters ?
What is oracle instant client?
write a sql query following source looking like below column1 column2 101,102,103 abc,def,ghi 1001,1002,1003 a,b,c i want the output column1 column1 101 abc 102 def 103 ghi 1001 a 1002 b 1003 c
What are triggers in oracle?
Explain the use of file option in exp command.
How to concatenate two text values in oracle?
How do we get field detail of a table?
What are the differences between char and nchar in oracle?
Explain the use of full option in exp command.