Write a query to get 2nd maximum salary in an employee table ?
Answer Posted / veera
SELECT * FROM EMP A WHERE &N-1=(SELECT COUNT(DISTINCT SAL) FROM EMP B WHERE A.SAL<B.SAL) ORDER BY SAL
Pass Paramenter :2..it will give the 2nd maximum salary
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
what are the difference between clustered and a non-clustered index? : Sql dba
What is a data definition language?
What is mdb stand for?
How to disable a trigger name update_salary?
When is the explicit cursor used ?
What are sql functions? Describe the different types of sql functions?
What is the difference between delete, truncate and drop command?
what is error ora-03113: end-of-file on communication channel?
what are all the different types of indexes? : Sql dba
What is sql performance tuning?
what is the difference between truncate and delete statement? : Transact sql
what is user defined functions? : Sql dba
Which are the different types of indexes in sql?
Where is sql database stored?
explain access control lists. : Sql dba