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 |
What is dictionary cache ?
Explain the use of record option in exp command.
How to speed up webrick?
Q) How to Find Max Date from each Group? (Asked in Infosys (INFI)Interview)
Can we create more than one constraint to column ?
Whatz the main diff between Subquery and a Join
14 Answers Oracle, Zeta Interactive,
find out first highest salary?
10 Answers Verinon Technology Solutions,
what is foreign key?
How to lock and unlock a user account in oracle?
acname actype amount ac1 credit 300 ac2 credit 4000 ac1 debit 4000 ac2 debit 455 ac1 credit 500 how to get sum of credit and sum of debit for each account
What is the difference between column level constraints and table level constraints?
14 Answers IBM, TCS,
what is trigger?