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
Does union all remove duplicates?
Name few endpoints exposed by ssrs 2012?
What is a print index?
How to edit table in sql server 2017?
What is the difference between a view and a stored procedure?
Why we use trigger in sql server with example?
What happens if the update subquery returns no rows in ms sql server?
Give some Scenario for Non Clusterd index? Can we write system defined functions in side The Function? Wat is the Unique Datatype?
Explain the disadvantages of cursors?
How to apply cascading referential integrity in place of triggers?
While migrating Microsoft SQL Server 2008 database to SQL Azure, what can be done to ensure the database connectivity does not degrade?
What is normalization 1nf 2nf 3nf?
What are ddl (data definition language) statements for tables in ms sql server?
What are page splits? : SQL Server Architecture
Explain what is “asynchronous” communication in sql server service broker?