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
Write an sql query for deleting duplicate rows?
What is abstracting periodical?
What is a View ? Can we insert, Update and delete a view?
What is best institute to Learn DotNET And SQL in chennai?
What do you understand by intent locks?
Explain mixed authentication mode of sql server?
What is the need for group functions in sql?
What is full outer join in sql server joins?
What are the common performance issues in sql server?
Name the different type of indexes in sql?
What is the syntax to execute the sys.dm_db_missing_index_details?
What is t-sql script to take database offline – take database online.
What is recursion? Is it possible for a stored procedure to call itself or recursive stored procedure? How many levels of sp nesting are possible?
What do you understand by coalesce in sql server?
explain different types of constraints? : Sql server database administration