how to find the second highest salary from emp table?

Answer Posted / vijay shegokar

select * from employee where salary=(select max(salary) from
employee where salary not in (select max(salary) from
employee));

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

what is offset-fetch filter in tsql? : Transact sql

530


What is difference between sql and oracle?

554


When can we use the where clause and the having clause?

574


How to run sql*plus commands in sql developer?

579


Can there be 2 primary keys in a table?

550






how can we find the number of rows in a table using mysql? : Sql dba

575


How many sql statements are used?

562


what is acid property in database? : Sql dba

555


What is output spooling in sql*plus?

544


Can we insert data in view?

497


How to run sql statements with oracle sql developer?

614


What is lookup table in sql?

599


How do I find duplicates in sql?

497


What are %type and %rowtype for?

611


When is the explicit cursor used ?

584