how to find the second highest salary from emp table?
Answer Posted / subash pandey
SELECT salary
FROM employee e
WHERE n = (
SELECT count( * )
FROM employee
WHERE salary > e.salary )
n=1 or 2 or 3 n is level which level max salary you want
i test this it proper work
| Is This Answer Correct ? | 4 Yes | 3 No |
Post New Answer View All Answers
What is mdf ldf and ndf?
What are the various restrictions imposed on view in terms of dml?
What is union and union all keyword in sql and what are their differences?
How many types of privileges are available in sql?
What is sql in java?
What are three advantages to using sql?
Does sqlite need a server?
What does t sql mean?
what are date and time intervals? : Sql dba
how many triggers are allowed in mysql table? : Sql dba
What is the difference between instead of trigger and after trigger?
What is the difference between cluster and non-cluster index?
How do you change a value in sql?
What is difference between function and trigger?
What is the process of debugging?