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
Typically, where is the conventional directory structure chosen for Oracle binaries to reside?
How to pass parameters to procedures in oracle?
Design database draw er diagram for a certain scenario ?
What is query image?
Explain oracle insert into command?
I just want to maintain data like an employee can belongs to 3 or more departments . We can resolve this by using composite key but it avoids normalization rules. So Can anyone tell me how can I maintain data.
How to use "in out" parameter properly?
can u plz provide me oca sql dumps please i need them
What is oracle and what are its different editions?
How to create a new table by selecting rows from another table?
What is difference between truncate and delete?
What are the different types of partitions in oracle?
What is procedure overloading in oracle?
What is an oracle tablespace?
What query tells you how much space a tablespace named test is taking up, and how much space is remaining?