Write a query to get 2nd maximum salary in an employee table ?
Answer Posted / gaurav mishra
The answer query is......
Select max(sal) from emp a where (&N-1) in(select count
(distinct(b.sal)) from emp b where a.sal<b.sal);
| Is This Answer Correct ? | 5 Yes | 4 No |
Post New Answer View All Answers
What is database sql?
how to drop an existing view in mysql? : Sql dba
How to avoid using cursors? What to use instead of cursor and in what cases to do so?
How can triggers be used for the table auditing?
What is substitution variable in pl sql?
What is a table in a database?
What is hibernate and its relation to sql?
Explain the select statement in sql?
What is a scalar value in sql?
What are the different types of dbmss?
Difference between table function and pipelined function?
What is primary key in db?
Can a key be both primary and foreign?
How many databases can sql express handle?
What is a join?