Write a query to find second highest salary of an employee.
Answer Posted / manoranjan
to select the nth highest salary from emp table
select distinct(a.sal) from emp a where &n=
(select count(distinct(b.sal))from emp b where a.sal<=b.sal);
| Is This Answer Correct ? | 3 Yes | 2 No |
Post New Answer View All Answers
How to get each name only once from an employee table?
Why we use pl sql?
What is a unique key?
What is a natural join sql?
What is the difference between the repeatable read and serializable isolation levels? : Transact sql
What are sql triggers used for?
How show all rows in sql?
What is dynamic query?
What is an escape character in sql?
What is the purpose of the partition table?
What is hibernate and its relation to sql?
define sql insert statement ? : Sql dba
What is fmtonly in sql?
explain primary keys and auto increment fields in mysql : sql dba
what is the difference between clustered and non clustered index in sql? : Sql dba