how to find the second highest salary from emp table?
Answer Posted / ram achare
for 2nd highest salary
select sal from(select distinct sal from emp order by sal desc limit 2)emp order by salary limit 1;
for 3rd highest salary
select sal from(select distinct sal from emp order by sal desc limit 3)emp order by salary limit 1;
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
Why is pl sql used?
Is it possible to update views?
Which one is better subquery or joins?
Do ddl statements need commit?
What is schema in sql?
What is use of package in pl sql?
What is dcl in sql?
Explain ttitle and btitle.
Define select, insert, create, delete, update, drop keywords
how to see the create table statement of an existing table? : Sql dba
What is the difference between a primary key and a clustered index?
What does sql stand for?
what are the different type of normalization? : Sql dba
Can we perform dml on view?
How many sectors are in a partition?