How to Select second Maximum salary in a Table ?
Answer Posted / abhijit
select max(sal) from table_name where
sal<(select max(sal) from table_name);
or
select sal from(select sal,dense_rank() over(order by sal
desc)
as rnk from table_name) where rnk=2;
| Is This Answer Correct ? | 3 Yes | 1 No |
Post New Answer View All Answers
Is there a combination of "like" and "in" in sql?
What are the built-in functions used for sending Parameters to forms ?
What is where clause in oracle?
How remove data files before opening a database?
How to rename a column in an existing table?
What are the numeric comparison operations?
Is primary key indexed by default in oracle?
What is execute immediate in oracle?
How to define a record variable to store a table row?
What are advantages of dateset in datastage?
What is Java Pool in Oracle?
What is a subquery?
Can objects of the same schema reside in different tablespace?
How index is implemented in oracle database?
How to write numeric literals in oracle?