Write a query to get 2nd maximum salary in an employee table ?
Answer Posted / rajesh
Guess this works...
select max(sal)
from (select * from emp
where sal not in (select max(sal) from emp))
Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
what is top in tsql? : Transact sql
What does the hierarchical profiler does?
What is 19 null in sql?
how many sql dml commands are supported by 'mysql'? : Sql dba
What is the use of sql trace?
What does rownum mean in sql?
What is sql indexing?
How can you create an empty table from an existing table?
how to get @@error and @@rowcount at the same time? : Sql dba
What are the two types of exceptions.
What is rank dense_rank and partition in sql?
How we can update the view?
How can I make sql query run faster?
Can delete statement be rollbacked?
how can we transpose a table using sql (changing rows to column or vice-versa) ? : Sql dba