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 index is implemented in oracle database?
Name the various constraints used in oracle?
various types of hints and their usage
How can we find out the current date and time in oracle?
Define the terms primary key foreign key and also the difference between primary and the unique key
Please explain joins in oracle?
What is the usage of merge statement?
What is system global area (sga) in oracle?
Why do you use stored procedures and state some of its disadvantages?
Other than making use of the statspack utility, what would you check when you are monitoring or running a health check on an Oracle 8i or 9i database?
Can the default values be assigned to actual parameters?
How do you rate yourself in oracle and sql server ?