find out the second highest salary?

Answer Posted / janmejaya

select top(1) * from employee where salary in (select
distinct top(2) salary from employee order by salary desc)
order by Salary




Above query is dynamic, if u want 3rd highest then just
change 2 to 3 , Please Try It

Is This Answer Correct ?    4 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the usage of save points in oracle database?

528


When do you get a .pll extension in oracle? Explain its importance

566


Differentiate between function and procedure in oracle.

553


What are the limitations of check constraint?

557


Why does oracle 9i treat an empty string as null?

530






What do you mean by merge in oracle?

587


How to rename an index?

575


What is varray?

578


Database is hung. Old and new user connections alike hang on impact. What do you do? Your SYS SQLPLUS session IS able to connect.

1664


What is the best way to do multi-row insert in oracle?

552


Explain user account with reference to oracle.

523


What happens if variable names collide with table/column names?

574


How do I know if oracle is installed on windows?

478


if you ctreate table identity

1836


What is a proxy object?

568