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
what is data control language? : Sql dba
What does trigger mean in psychology?
What are the most important ddl statements in sql?
how does a local variable is defined using t-sql? : Transact sql
What is meant by user defined function?
What is transaction control language (tcl)?
What is the difference between delete and truncate commands?
What does (+) mean in sql joins?
How do you delete a table?
what is the difference between delete and truncate commands? : Sql dba
Is keyword pl sql?
What can you do with pl sql?
Can one improve the performance of sql*loader? : aql loader
What is sql basics?
What is the default isolation level in sql server? : Transact sql