what is syntex second or third highest salary.
thanks & Regards
Dhirendra sinha
Answer Posted / vikas kant
---To get 2nd highest salary----
select Top 1 salary from Emp where marks in(select top 2
salary from Emp order by salary desc)
---To get 3rd highest salary----
select Top 1 salary from Emp where marks in(select top 3
salary from Emp order by salary desc)
Regards Vikas Kant
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
What is the security principal at the database level that represents your session?
explain different types of constraints? : Sql server database administration
How would we use distinct statement? What is its use?
Does sql server use java?
What is replication with database mirroring? : sql server database administration
What are the advantages dts has over bcp?
Give a example to search fr a string in all stored procedure in sql server.
What is the security principal at the server level that represents your session?
What is the significance of master, tempdb and model databases?
What is the minimum recommended amount of ram for sql server 2012 enterprise?
What are the differences between “row_number()”, “rank()” and “dense_rank()”?
How to get a list of columns using the "sp_help" stored procedure in ms sql server?
Write a program to fetch first 10 records from a file?
what are the three command line utilities and what are their primary functions?
What does this statement do @@rowcount?