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 / amar banerjee
sol1> select MAX(salary) from emp where salary< (select MAX(salary) from emp);
sol2> select salary from emp sort by salary desc limit 1,1;
for finding nth position
select salary from emp sort by salary desc limit n-1,1;
| Is This Answer Correct ? | 4 Yes | 2 No |
Post New Answer View All Answers
Is it safe to delete log files?
How do I view a stored procedure in sql server query?
how you can configure a running aggregate in SSRS?
What do you need to connect php to sql server?
How many categories of data types used by sql server?
Tell me what is the significance of null value and why should we avoid permitting null values?
Tell me about builtinadministrator?
What is indexing a document?
What is the cartesian product of the table?
What happens if null values are involved in boolean operations?
What are different types of join?
What is a transact-sql statement batch in ms sql server?
Do you know spatial data types - geometry and geography in sql server 2008?
What is 2nf normalization form?
What is the stored procedure?