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 order of defining local variables and sub procedures/functions?

818


What is bulk load in oracle?

820


How do I know if oracle is installed on windows?

665


How to use windows user to connect to the server?

725


What are temporal data types in oracle?

840


Differentiate between function and procedure in oracle.

771


How to delete all rows a table in oracle?

806


What is a initialization parameter file in oracle?

768


How to create an oracle database manually?

792


How to export your connection information to a file?

797


does the query needs a hint to access a materialized view?

1643


What is a dead lock in oracle?

807


Please explain oracle data types with examples?

780


What is a view and how is it different from a table?

725


How to create an oracle database?

766