Answer Posted / prabhudatta barick
--IN ORDER TO FIND THE NTH HIGHEST SALARY,
--WE JUST FIND THE SALARY THAT HAS EXACTLY N-1 SALARIES
GREATER THAN ITSELF---
--This is correlated subquery--
select empno,
ename,
sal
from scott.emp e
where &n-1=(select count(distinct b.sal) from scott.emp b
where b.sal>e.sal);
To get second highest salary put n value 2.
Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
Explain the use of record option in exp command.
I am using an Oracle 8i Database my data contains Clob data. I am using toad version 7.6 i am able to get the data in toad but unable to extract the data in excel.when trying to extract the data into the excel the toad error says out of memory. Can any body please help me to extract the data through the same toad version. Thanks in advance
What are the execution control statements?
What are the uses of linked server and explain it in detail?
What is program global area (pga) in oracle?
What is the maximum number of triggers that can be applied to a single table?
what is meant by magic query
Explain rename?
What is a table index?
Can we connect to ORACLE db using Windows Authentication?
List out the components of logical database structure of oracle database.
How do you tell what your machine name is and what is its IP address?
What is meant by raw datatype?
 What are the oracle DML commands possible through an update strategy?
State any two functions of oracle?