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 |
query optmization techniques and quwry analyser+projects+ppts
Can we create index on views?
19 Answers CTS, Syntel, TCS,
What is Oracle table?
5. Display full details for the creditor/s who has received the single largest payment. Do not use a table join or set operator anywhere in your query.
What is oracle rowcount?
material view and view disadvantages?
State the difference between a primary key and foreign key?
definition of cluster and non-clustered index?
Which Oracle App Is Most Popular One ?
What to do if dba lost the system password?
How would you configure your networking files to connect to a database by the name of DSS which resides in domain icallinc.com?
How can we manage the gap in a primary key column created by a sequence? Ex:a company has empno as primary key generated by a sequence and some employees leaves in between.What is the best way to manage this gap?