how to find the fifth highest salary?

Answer Posted / saraswathi muthuraman

SQL> select * from emp_test order by sal desc;

1003 20010 11
1001 10000 11
1001 10000 11
1002 100 11
1004 99 11
1005 50 11
1006 25 11

SQL> select * from (select emp_no,dep_no,sal,rank() over
(order by sal desc) as rank_list from emp_test) where
rank_list =5;

1004 11 99 5

Is This Answer Correct ?    5 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is Relationship type?

546


What is the difference between cube operator and roll up operator? : sql server architect

487


What are the the Advantages of DBMS?

499


What is msdb database? : sql server architect

569


What are the different phases of transaction?

493






What is app tier?

485


What is difference between 2 tier and 3 tier architecture?

441


What do you mean by atomicity and aggregation?

516


State about the security aspects of stored procedures?

561


What is 3NF?

542


What is single tier architecture?

450


in oracle BPM composer in part BA model on design model in enterprise model i cannot connection with value chain model work not links in part properties do you can me help me?

1111


What is RDBMS KERNEL?

749


What is database architecture? : sql server architect

479


Not only RDBMS takes care of locating data it also

454