how to get second highest salary in SQL(as/4000
Answer Posted / apurva
Select *
From (
Select *
From (select * from emp order by sal desc)
Where rownum < 3 order by sal) ---> n+1 for example for
secound you should use 3
Where rownum < 2
| Is This Answer Correct ? | 4 Yes | 7 No |
Post New Answer View All Answers
what are myisam tables? : Sql dba
how to get a list of indexes of an existing table? : Sql dba
Suppose a student column has two columns, name and marks. How to get name and marks of the top three students.
what is foreign key? : Sql dba
what is a database transaction? : Sql dba
What is the difference between a primary key and a unique key?
What is input buffer in sql*plus?
What does := mean in pl sql?
How do I make my sql query run faster?
What is a subquery in sql?
How run sql*plus commands that are stored in a local file?
What is the difference between python and sql?
What is a temporal table?
what is union? : Sql dba
What is meant by cursor in sql?