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
Is id a reserved word in sql?
What sql does db2 use?
How many types of functions are there in sql?
Under what condition it is possible to have a page level lock and row lock at the same time for a query? : Transact sql
How bulk collect improves performance?
What is sqlerrd?
what are date and time data types? : Sql dba
What are the types of triggers in sql?
What is user in sql?
Which command is used to delete a package?
What are the most important ddl statements in sql?
What is pls_integer in pl sql?
What does sign mean sql?
What are the different types of dbmss?
what are the advantages of using stored procedures? : Sql dba