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
What is a join in sql?
How do I schedule a sql server profiler trace?
Differentiate between sql temp table vs table variable?
How do I start sql server 2017?
How network traffic be reduced by using the stored procedure?
mention different types of relationships in the dbms?
Mention the uses of stored procedures.
What are the different types of indexes?
what is raid and what are different types of raid configurations? : Sql server database administration
Describe in brief databases and sql server databases architecture.
What is subreport?
What is BCP? When does it used in sql server 2012?
How many replicas are maintained for each sql azure db?
How to how to convert numeric expression data types using the convert() function??
How is sql server used?