How to Select second Maximum salary in a Table ?
Answer Posted / sunil
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)
as rnk from table_name) where rnk=2;
| Is This Answer Correct ? | 7 Yes | 4 No |
Post New Answer View All Answers
What is format trigger?
How to login to the server without an instance?
What is the difference between postgresql and oracle?
How to upsert (update or insert into a table)?
How many types of segments in Oracle?
what is the dual table in oracle?
How to change system global area (sga) in oracle?
How do I uninstall oracle client from windows?
Explain a data segment?
How do you find out from the RMAN catalog if a particular archive log has been backed-up?
What is difference between sid and service name in oracle?
How to add a new column to an existing table in oracle?
What is Segment Advisor in Oracle?
How do I call oracle stored procedures that take no parameters?
Explain the difference between sap and oracle?