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
What is sql key?
What is PL/SQL Records?
What is a Mapplet?
can a stored procedure call itself or recursive stored procedure? : Sql dba
What is the purpose of my sql?
Can we group by two columns in sql?
what is a database transaction? : Sql dba
Does sql full backup truncate logs?
What is sqlcommand?
what is the use of set statement in tsql? : Transact sql
What is sql query optimization?
Is delete faster than truncate?
Explain the difference between 'between' & 'and' operators in sql
Which tcp/ip port does sql server run on? How can it be changed? : Sql dba
What are the parameter modes supported by pl/sql?