find out the third highest salary?
Answer Posted / harmeet
Hi, this query will gives the third highest salary from table
select * from emp e
where 3 = (select count(sal) from emp
where e.sal < sal);
To dispay 5th highest salary, just change the number 3 to 5.
Like that we can find top N salaries.
I hope i'm not wrong.
Is This Answer Correct ? | 44 Yes | 16 No |
Post New Answer View All Answers
How to connect to oracle using service name instead of sid?
What exactly do quotation marks around the table name do?
How to define an anonymous procedure with variables?
What are the different types of synonyms?
can anyody please send me the dump for Oracle 10g certifications for DBA path?
ur a sql devoloper...what is the process in ur company for finding the database BUGS .. seperate DB testers are there? or devr.s are manage? if DB TESTERS in there what is the process
How to set up autotrace for a user account?
How to count groups returned with the group by clause in oracle?
How many data types are supported?
Explain the use of rows option in exp command.
Database crashes. Corruption is found scattered among the file system neither of your doing nor of Oracles. What database recovery options are available? Database is in archive log mode.
How to resolve name conflicts between variables and columns?
What is blob datatype?
What are the general rules on data consistency?
What is an oracle transaction?