how to find the second highest salary from emp table?
Answer Posted / mangesh pardhi
SELECT salary
FROM employee e
WHERE 2=(SELECT COUNT(DISTINCT salary)
FROM employees
WHERE e.salary<=salary)
--replace the number with 2,3,4 u wil find the that position
salary
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
Is left join same as join?
Is join an inner join?
What are sql functions? Describe the different types of sql functions?
What is query execution plan in sql?
How do I tune a sql query?
Why do we use %rowtype & %type in plsql?
How do I run a sql query in pgadmin 4?
What are character functions?
Which join is like inner join?
how to fetch alternate records from a table? : Sql dba
What is the difference between partition and index?
explain mysql aggregate functions. : Sql dba
Can a trigger call a stored procedure?
Is sql a case sensitive language?
Why do we use function in pl sql?