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 are different Oracle database objects?
can u send the sql dumps to sivakumarr1987@gmail.com plz help me
How data locks are respected in oracle?
What is the sql query to concatenate column values from multiple rows in oracle?
5. Display full details from the ORDER_LINE table where the item number is (first condition) between 1 and 200 (no > or < operators) OR the item number is greater than 1000 AND (second condition) the item cost is not in the list 1000, 2000, 3000 OR the order number is not equal to 1000.
What is meant by recursive hints in oracle?
How to start your 10g xe server?
waht is the difference between primary key and super key?
Illustrate how to determine the amount of physical CPUs a Unix Box possesses (LINUX and/or Solaris).
What would you use to improve performance on an insert statement that places millions of rows into that table?
How do I spool to a csv formatted file using sqlplus?
What a SELECT FOR UPDATE cursor represent.?