how to find the second highest salary from emp table?
Answer Posted / nitin umale
SELECT *
FROM employees
WHERE salary =
( SELECT MIN ( r.salary)
FROM ( SELECT salary
FROM ( SELECT DISTINCT salary
FROM employees
ORDER BY NVL(salary,0) DESC
)
WHERE rownum<3) r
);
| Is This Answer Correct ? | 0 Yes | 1 No |
Post New Answer View All Answers
Is left join faster than join?
Hi how to import oracle sequence in Informatica? Please write stored procedure code that will import oracle sequence in Informatica SP transformation as per below scenario Oracle table product list Pro_id, pro_name 101, LED Lights. 102, 20watt CFL Lights. 103, 30 watt CFL lights Now a new flat file with new product list needs to be added to oracle table product list with oracle sequence. flat file product Prono,pro_name, 1, 20 watt tube light 2, 30 watt tube light & target should be like 101, LED Lights. 102, 20watt CFL Lights. 103, 30 watt CFL lights. 104, 20 watt tube light 105, 30 watt tube light thks reg suvarna joshi suvarnaatsuvarna@rediffmail.com
What is clustered and nonclustered index in sql?
what are the differences between get and post methods in form submitting. Give the case where we can use get and we can use post methods? : Sql dba
How many commands are there in sql?
what is the difference between undefined value and null value? : Sql dba
Define union, minus, union all, intersect ?
what are the differences among rownum, rank and dense_rank? : Sql dba
What are views in sql?
What is pl sql and why it is used for?
What is the difference between left join and right join?
how many ways to get the current time? : Sql dba
What is AUTH_ID and AUTH_USER in pl/sql ?
What is rank dense_rank and partition in sql?
Can we create table in function?