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
Explain the difference in execution of triggers and stored procedures?
Define overloaded procedure?
Explain dml and ddl?
What is data profiling in sql?
What is database migration?
What is a unique key and primary key and foreign key?
What is range partitioning?
What is difference between hql and native sql?
Difference between truncate, delete and drop commands?
What is pivot in sql?
The in operator may be used if you know the exact value you want to return for at least one of the columns.
what is text? : Sql dba
what are the authentication modes in sql server? How can it be changed? : Sql dba
Where is all the data on the internet stored?
What is difference between nchar and nvarchar?