How to find the second largest salary in the emp database and
also How to find 3rd,4th and so on ........ in the emp database
plz mail the answer @ mak2786@gmail.com
Answer Posted / veerdhawal
mysql> select max(sal) from emp where sal not in (select
max(sal) from emp);
+----------+
| max(sal) |
+----------+
| 30000 |
+----------+
1 row in set (0.01 sec)
| Is This Answer Correct ? | 1 Yes | 1 No |
Post New Answer View All Answers
What are the difference between primary key and unique key? : sql server database administration
What is a deadlock and what is a live lock?
When do you think a developer should use sql server-based cursors?
What is full outer join in sql server joins?
Will sql server 2005 allow you to reduce the size of a column?
What is scalar user-defined function?
What is page in sql server?
Write a code to select distinct records without using the DISTINCT keyword.
What is federation member?
When would you use sql joins?
What is Fragmentation and Defragmentation? For 32GB Table,How can we do the fragmentation?
how would you improve etl (extract, transform, load) throughput?
what are constraints? Explain different types of constraints? : Sql server database administration
What is difference between count (*) and count 1?
is there a column to which a default can't be bound? : Sql server database administration