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 / prasant palo
with ttble as
(
select top 3 empid,empname,empsalary
from
emptable
order by empsalary desc
)
-- above will create a common table expression with name
--ttable
-- to know about it search for commontable expression
select top 1 empid,empname,empsalary
from
ttable
order by empsalary asc
| Is This Answer Correct ? | 2 Yes | 5 No |
Post New Answer View All Answers
Describe different Processing Modes offered by SSRS?
What is amo? : sql server analysis services, ssas
Write a SQL queries on Self Join and Inner Join.
Explain what is the main purpose of having conversation group?
What are the characteristics of modern DBMS?
What are the different types of columns types constraints in the sql server?
How many columns can we include on clustered index ?
Explain Reporting Life Cycle?
What to perform pattern match with the like operator?
what are the disadvantages of cursors? : Sql server database administration
How to define the name and server for a new dsn?
Is sql server 2016 free?
What is the difference between ddl,dml and dcl commands?
What are the methods used to protect against sql injection attack?
Do you know what is rank function?