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
Will sql server 2005 allow you to reduce the size of a column?
What is the use of tempdb? What values does it hold?
What is side by side migration in sql server?
What do you understand by mirroring?
What is the difference between varchar and nvarchar?
What do you know about system database? : SQL Server Architecture
Explain what is raid and what are different types of raid levels?
Explain primary key and foreign key constraints?
What are sparse columns?
Can two tables share a primary key?
Can we use custom code in ssrs?
Can a stored procedure call itself or recursive stored procedure? How many levels sp nesting is possible?
What is a self join in sql server?
What is the difference between ROW_NUMBER and Ranking function in SQL SERVER?
How can we get count of the number of records in a table?