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 is the difference between local and global temporary table?
Mention what pl/sql package consists of?
What does varchar include?
Which language is used in sql?
How is a PL/SQL code compiled?
What is secondary key?
Is not null in sql?
How to write html code in pl sql?
How to get each name only once from an employee table?
How global cursor can be declare with dynamic trigger ?
What is the difference between alter trigger and drop trigger statements?
Which data dictionary views have the information on the triggers that are available in the database?
What is %type in sql?
How delete a row in sql?
How many triggers can be applied on a table?