from the table display the 2nd highest salary?
and also the least 2nd salay?
Answer Posted / sridhar sahoo
select distinct top 1 salary from payroll..emp where salary
in(select distinct top N salary from payroll..emp order by
salary desc)
if u want top 2 put 2 at the pacece of N
if u want top 5 put 5 at the pacece of N
if u want ..............................
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
How would you add a section to a table?
Can a stored procedure call itself or a recursive stored procedure? How many levels of sp nesting is possible?
Ms sql server index?
What are “lost updates”?
What happens if you insert a duplicate key for the primary key column in ms sql server?
What is difference between clustered index and non clustered index?
What are the different types of backups that exist?
How can you start sql server in different modes?
What is tabulation?
What happens if null values are involved in bitwise operations?
How to loop through returning rows?
What should be the fill factor for indexes created on tables? : sql server database administration
What are data driven subscriptions?
What do you know about system database? : SQL Server Architecture
What is partition in sql server?