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
Explain microsoft sql server functions?
Explain about integration services of Microsoft SQL server?
How do you test your database? : sql server database administration
How many types of built in functions are there in sql server 2012?
How to enter binary string literals in ms sql server?
What is report server project?
Explain having clause and where clause?
How to create stored procedures with parameters in ms sql server?
How can a database be repaired?
What are cursors in ms sql server?
Explain how to send email from sql database?
Your sql server is running out of disk space. You notice that there are several large files with ldf extensions what are these files?
Explain how many types of relationship?
How to invoke a trigger on demand?
How to locate and take substrings with charindex() and substring() functions?