Write a query to get 2nd maximum salary in an employee table ?
Answer Posted / satya_k21
Hi,
Select * from emp e where 2>= (select count(sal) from
emp e where sal>=e.sal) order by desc.
Let me know if it is wrong..
Regards,
Satya.K
Is This Answer Correct ? | 11 Yes | 16 No |
Post New Answer View All Answers
how to write date and time literals? : Sql dba
What is the difference between numeric and autonumber?
What is a primary key sql?
can a stored procedure call itself or recursive stored procedure? How much level sp nesting is possible? : Sql dba
What is the difference between drop and truncate commands?
Can I join the same table twice?
Explain the working of foreign key?
What is schema in sql example?
how to include numeric values in sql statements? : Sql dba
Can a procedure in a package be overloaded?
Can there be 2 primary keys in a table?
What is the difference between rollback and rollback to statements?
What is the unique index?
What are all the different normalizations?
How to write a query to show the details of a student from students table whose