find out first highest salary?

Answer Posted / tulasi

select * from emp x where 1=(select count(distinct sal)
from emp y where x.sal<=y.sal);

query to find nth sal

select * from emp x where &n=(select count(distinct sal)
from emp y where x.sal<=y.sal);

Is This Answer Correct ?    5 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to define an anonymous block?

608


What is the disadvantage of User defind function?

1822


Select all the employees who were hired in last 2 years and who works in dept where max managers are working.

2442


State any two functions of oracle?

628


Explain the use of indexes option in imp command.

557






What is a sub query? Describe its types?

532


How to work with data objects interactively?

544


How to bring a tablespace online?

507


How to sort the query output in oracle?

598


Explain the use of consistent option in exp command.

541


Explain view?

571


What is a private synonym?

1071


If any one has information regarding interview of NIC (National Informatics Centre),it would be of great help...

1722


How to test null values?

664


Explain self joins in oracle?

548