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
Why do we need oracle client?
How to establish administrator authentication to the server?
What are the uses of a database trigger?
what's query optimization and without use of IN AND Exist can we get another way data from query
What is a nested table and how is it different from a normal table?
Explain view?
How to execute a stored program unit?
How do I recompile a procedure in oracle?
Explain the use of compress option in exp command.
How to grant create session privilege to a user in oracle?
What is max rowid in oracle?
Explain overloading. Can functions be overloaded?
Write a syntax for update query in oracle?
What are the four Oracle system processes that must always be up and running for the database to be useable?
When do you get a .pll extension in oracle?