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 / pankaj arya
select top 1 sal from emp where empid in(select top 2 empid
from emp order by sal desc) order by
sal asc
if you want to get 3rd one than put 'top 3' in subquery and
same for 4th, 5th....
Is This Answer Correct ? | 15 Yes | 14 No |
Post New Answer View All Answers
Explain the truncate command? : SQL Server Architecture
Can you type more than one query in the query editor screen at the same time?
Explain what is sql server english query?
What is shared lock?
How do you create a clustered index?
What is the report model project?
Describe the functionalities that views support.
What part does database design plays a role in performance of an sql server-based application?
How to loop through result set objects using mssql_fetch_array()?
Tell me what is fill factor?
what exactly sql injuction.how to overcome.....
IF more than one Site is accessing the same Database server and I want to move the DB with Minimum down time? How will you do
What causes index fragmentation?
What is the optimization being performed in oracle and SQL Server?
Can we call future method from queueable?