what is syntex second or third highest salary.
thanks & Regards
Dhirendra sinha
Answer Posted / veeresh kethari
with Topsal (EmpID,Ename,Sal,Dno,Topsal) as
(select *,row_number() over(order by sal) Topsal from emp)
select top 2 EmpID,Ename,Sal,Dno from Topsal order by sal desc
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
What is a trigger and types of a trigger?
What is the difference between an index and a unique index?
Can we do dml on views?
How to find which stored procedure is currently running in sql server?
What is snapshot parameter in ssrs?
What are the types of joins in sql?
What is the native system stored procedure to execute a command against all databases?
What is @@error in sql?
How to create a trigger for insert only?
what are the different stages of Report Processing?
What is merge?
Does union all remove duplicates?
Do I need a report server to run reports in my application?
What is the command used to recompile the stored procedure at run time?
What is the query and subquery?