Write a query to get 2nd maximum salary in an employee table ?
Answer Posted / anil_abbireddy
select * from emp a where 2=(select count(distinct sal)
from emp b where a.sal<=b.sal)
Is This Answer Correct ? | 44 Yes | 12 No |
Post New Answer View All Answers
Why do we use sqlite?
What is %s in sql?
What is indexes?
Why should I use postgresql?
how to get @@error and @@rowcount at the same time? : Sql dba
How to write html code in pl sql?
What is the difference between clustered and non-clustered indexes?
Can you call pl/sql package functions from within a fast formula?
How to fetch values from testtable1 that are not in testtable2 without using not keyword?
How can we avoid duplicating records in a query?
What is the plv (pl/vision) package offers?
What is data definition language?
Why do we create stored procedures & functions in pl/sql and how are they different?
What are the different schemas objects that can be created using pl/sql?
What is composite data type in pl sql?