find out the third highest salary?
Answer Posted / haneef
Best One
select top 1 * from test_emp where sal in (select top 3 sal
from test_emp order by sal desc) order by sal asc
or
It also work
select top 1 * from test_emp where sal in (select top 3 sal
from test_emp order by sal desc) order by sal asc
select top 1 MAX(sal),id from test_emp where sal < (select
max(sal) from test_emp where sal < (select max(sal) from
test_emp))
group by id,sal order by sal desc
Is This Answer Correct ? | 0 Yes | 1 No |
Post New Answer View All Answers
Whats the benefit of dbms_stats over analyze?
What is oracle join syntax?
How to create a single index for multiple columns?
List the types of joins used in writing subqueries?
Calculate difference between 2 date / times in oracle sql?
How to convert a string to a date in oracle database?
Explain a segment?
What is translate in oracle?
How to create a table interactively?
Please explain me all types of Data models. Also give me the details if each model can have other name.for example:schematic data model is also known as conceptual data model and entity relation data model.
what are steps for interface? where is exchange rate defined in which table?
How to open and close an explicit cursor in oracle?
What do you mean by a database transaction & what all tcl statements are available in oracle?
Explain the use of ignore option in imp command.
Can a formula column be obtained through a select statement ?