find out first highest salary?

Answer Posted / surya

select * from emp where &n-1=(select count(distinct sal)
from emp e where emp.sal<e.sal);

For example:-
If you enter n=1,it will display first highest salary
if you enter n=2,it will display second highest salary
......

if you enter n=nth,it will display nth salary

Is This Answer Correct ?    9 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can we save images in a database and if yes, how?

590


1) What is ONE_SIZE_FITS_ALL approach? 2) Explain the Common & Variable Header of DATA FILE? 3) What are the Drawbacks to using OMF DB? and the Advantages? 4) List out the Advantages of Undo T.spaces over the Undo SEGMENT? 5) Difference between the Temporary tablespace with TEMPFILE and the Tablespace with TEMPORARY Keyword? 6) What are the situation extents are freeing for reuse.

1605


How to convert characters to times in oracle?

594


Why do we use bulk collect in oracle?

569


Why is oracle so popular?

558






Explain the use of parfile option in exp command.

523


What types of joins are used in writing subqueries?

563


What is meant by raw datatype?

568


How to create an oracle database?

582


Explain view?

577


How to rename an index?

588


defination of bitmap index

1624


WHAT IS ecc 6.0

1660


What is oracle rowcount?

576


Explain overloading. Can functions be overloaded?

568