how to find the second highest salary from emp table?
Answer Posted / shalina bajaj
select sal from emp a
where $number = (select count(distinct(sal))
from emp b
where a.sal <= b.sal);
Is This Answer Correct ? | 11 Yes | 17 No |
Post New Answer View All Answers
What is the basic form of sql query?
Enlist the characteristics of pl/sql?
Can a foreign key have a different name?
What is basic structure of pl sql?
Can you selectively load only those records that you need? : aql loader
what are the maximum number of rows that can be constructed by inserting rows directly in value list? : Transact sql
How do I copy a table in sql?
What is AUTH_ID and AUTH_USER in pl/sql ?
Does sql full backup truncate logs?
Is a foreign key always unique?
What is an inner join sql?
What is a temp table?
Can we rollback after truncate?
Can we create foreign key without primary key?
What is execution plan in sql?