How to retrieve 5th highest sal from emp table?

Answer Posted / vasu

select * from emp a where &nth in(select count(b.sal) from
emp b where b.sal<=a.sal);

Is This Answer Correct ?    1 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How do I limit the number of rows returned by an oracle query after ordering?

642


What is program global area (pga) in oracle?

611


Tab A A B ------ 1 A 2 B 3 C Tab B A B ----- 4 D 5 E 6 F Generate the value into B table from A table. Only table A has the value. Write the SQL query to get B table value.

1266


What is oracle sid?

511


What query tells you how much space a tablespace named test is taking up, and how much space is remaining?

1814






How to display row numbers with the records?

590


State the various uses of dbcc command?

552


Explain the use of record length option in exp command.

566


Can we use oracle pl/sql block in core java? if so how? pls get back to me .....

2513


How to use null as conditions in oracle?

586


Is there any way to find out when one specific table/view/M-view is used last time. i.e. when one specific object is used in any SELECT statement.

864


How to create a temporary table in oracle?

694


What is a oracle database?

615


What is oracle rowcount?

582


What privilege is needed for a user to insert rows to tables in another schema?

569