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
What is the primary key?
Why do we use cursors?
how to do backup entire database? : Transact sql
What are inbuilt functions in sql?
How to use distinct and count in sql query? Explain
Whis is not false in primary key?
Explain the difference between rename and alias?
Is null operator in sql?
Is pl sql still used?
list out some tools through which we can draw e-r diagrams for mysql. : Sql dba
What is a crud api?
what are the differences between procedure-oriented languages and object-oriented languages? : Sql dba
What is the difference between a subquery and a join?
what are properties of a transaction? : Sql dba
how to get a list of all tables in a database? : Sql dba