from the table display the 2nd highest salary?
and also the least 2nd salay?
Answer Posted / smitha
2nd Highest Salary
Select top 1 salary from (select distinct top 2 salary
from employee order by salary desc)a
order by salary
2nd Least Salary
Select top 1 salary from (select distinct top 2 salary
from employee order by salary asc)a
order by salary desc
| Is This Answer Correct ? | 3 Yes | 2 No |
Post New Answer View All Answers
What is the difference between varchar and varchar types?
application server is slow what may be the problem
What methods do you follow to protect from sql injection attack?
You schedule a job to run every minute what will happen if the first job runs more than 1 min? Will the second instance of the job start?
what are the important architecture components of SSRS?
Is mysql better than sql server?
Your table has a large character field there are queries that use this field in their search clause what should you do?
Can you pass expressions to stored procedure parameters?
What is the fastest way to permanently delete a 1 million row table named customers?
Is truncate autocommit?
What is a ddl statement?
What is default constraint?
What is bulkcopy in sql?
How to provide default values to stored procedure parameters?
how you can get the list of largest tables in a database? : Sql server administration