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
what are the advantages of sql ? : Sql dba
What is a constraint?
What is bind reference and how can it be created?
What is nosql example?
How is a PL/SQL code compiled?
What is meant by <> in sql?
How do I find duplicates in a single column in sql?
What are sql queries used for?
If a cursor is open, how can we find in a pl/sql block?
How many types of sql are there?
What is snowflake sql?
Define commit?
Is it possible to pass parameters to triggers?
What are the different types of constraints?
What is character functions?