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
How many sql are there?
how to present a past time in hours, minutes and seconds? : Sql dba
What is a table partition?
What is the usage of sql functions?
What is sql and db2?
Which column of the user triggers data dictionary view displays the database event that will fire the trigger?
Why do we need pl sql?
Does sql*plus also have a pl/sql engine?
Does sql view stored data?
What is schema in sql?
What is dynamic query?
What is consistency?
How many types of primary keys are there?
How does pl sql work?
How do I install sql?