Write a query to find second highest salary of an employee.
Answer Posted / satheesh
SELECT MAX(SAL) FROM EMP A
WHERE SAL NOT IN(SELECT MAX(SAL) FROM EMP B);
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
Can primary key be changed?
what are the differences between procedure-oriented languages and object-oriented languages? : Sql dba
Why do we use partitions in sql?
What is sql injection vulnerability?
Does truncate free space?
How can you tell the difference between an index and a view?
how can we transpose a table using sql (changing rows to column or vice-versa) ? : Sql dba
What is the use of double ampersand (&&) in sql queries? Give an example
Why query optimization is needed?
Does a user_objects view have an entry for a trigger?
What are the operators used in select statements?
Why do we need unique key in a table?
What is a schema sql?
What is data control language?
What is Collation Sensitivity ? What are the various type ?