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
Differentiate between syntax and runtime errors.
Write a sql query to find the names of employees that begin with ‘a’?
What is primary key secondary key alternate key candidate key?
what is a foreign key ? : Sql dba
What is data type in sql?
What is the difference between function and procedure in pl/sql?
Why are aggregate functions called so?
Is it possible to create startup or shutdown trigger for on-schema?
What is the file extension for sql database?
How much does a sql dba make? : SQL DBA
What is rename command in sql?
How many types of cursors supported in pl/sql?
Which operator is used in query for pattern matching?
What is an alias command?
How does one load ebcdic data? : aql loader