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
How can use stored procedures in sql?
Write a sql query to get the third highest salary of an employee from employee_table?
what is the difference between where clause and having clause? : Sql dba
How can get second highest salary in sql?
What is the difference between subquery and correlated query?
What is the difference between explicit and implicit cursors in oracle?
What is the difference between clustered and non-clustered index in sql?
How delete a row in sql?
What is nosql db?
What is faster join or subquery?
What's the difference between inner join and left join?
table structure: ---------------- col1 col2 ----- ----- 01-mar-2012 11:12:46 01-mar-2012 11:12:10 01-mar-2012 11:12:46 01-mar-2012 11:11:23 Write a query to display the result as shown below: col1 col2 ----- ----- 01-mar-2012 11:12:46 01-mar-2012 11:12:10
What are the types of dbms?
What is the size of partition table?
what are the advantages and disadvantages of cascading style sheets? : Sql dba