how to find the second highest salary from emp table?
Answer Posted / erp_guns
SELECT MAX(sal) from emp a where &n=(select COUNT(DISTINCT
(SAL)) from emp b where a.sal<=b.sal)
Is This Answer Correct ? | 39 Yes | 22 No |
Post New Answer View All Answers
Is sql between inclusive?
Can I join the same table twice?
What is difference between procedure and trigger?
What is the largest value that can be stored in a byte data field?
what are myisam tables? : Sql dba
Can we use insert statement in function?
Why left join is used in sql?
What is the difference between having clause and where clause?
What is clustered and nonclustered index in sql?
How can you get sql*loader to commit only at the end of the load file? : aql loader
What is denormalization in a database?
What is the best sql course?
How to select 10 records from a table?
What is package in pl sql?
How to use transactions efficiently : transact sql