Write a query to get 2nd maximum salary in an employee table ?
Answer Posted / priya
select rownum,empno,sal from (select
rownum,empno,sal from emp order by sal desc) group
by rownum,empno,sal having rownum=2;
This will clearly work.............
| Is This Answer Correct ? | 6 Yes | 3 No |
Post New Answer View All Answers
Why do we need cursors in pl sql?
What is difference between hql and native sql?
Can you selectively load only those records that you need? : aql loader
Is natural join same as inner join?
What is the use of function in sql?
When to use inner join and left join?
What are basic techniques of indexing?
Enlist the data types that can be used in pl/sql?
how to include comments in sql statements? : Sql dba
What is count * in sql?
How do I remove all records from a table?
What is the use of prepared statement?
what is the difference between a having clause and a where clause? : Sql dba
what is auto increment? : Sql dba
Can we create a trigger on view?