Write a query to find second highest salary of an employee.

Answer Posted / mubin ahmad

select salary from employee e1 where 2=(select count(*)
from employee e2 where e2.salary>=e1.salary)

Is This Answer Correct ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is bitemporal narrowing?

744


What are sql commands?

509


Why do we need pl sql?

554


Can we use the cursor's to create the collection in PL/SQL?

524


what is the difference between a having clause and a where clause? : Sql dba

530






Why do we create stored procedures & functions in pl/sql and how are they different?

513


What are the different datatypes available in PL/SQL?

577


Which constraints we can use while creating database in sql?

624


How do I audit the sql sent to the server?

533


what is cross join? : Sql dba

580


What are pl sql procedures?

529


Are dml statements autocommit?

561


How many types of cursors are available in pl/sql?

593


Is left join faster than join?

555


Can we have two clustered index on a table?

572