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
If a cursor is open, how can we find in a pl/sql block?
How to Declare Fixed Length String Value In PL SQL
What is difference between nchar and nvarchar?
What is the difference between stored procedure and view?
What is normalization? How many normalization forms are there?
what is the command used to fetch first 5 characters of the string? : Sql dba
Can we use two order by clause in query?
What is sql entity?
what is user defined functions? : Sql dba
what is the syntax used for partition in tsql? : Transact sql
What action do you have to perform before retrieving data from the next result set of a stored procedure ?
What is sharding in sql?
How do you modify a column in sql?
What is package in pl sql with an examples?
How do I edit a trigger in sql developer?