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
OPTIMIZATION OF SP,CURSOR,TRIGGERS
Can a unique index be created on a column, which contains null?
What are the differences between stored procedure and view in sql server?
How to change parameter value inside the report?
What happens if an integer is too big for int date type?
What is transaction server isolation?
What is compression - row-level and page-level compression?
What are the advantages of using cte?
How to remove duplicate rows from table except one?
what are constraints? : Sql server database administration
Is it possible for a stored procedure to call itself or recursive stored procedure?
Explain what is public role in sql server?
What different steps will a sql server developer take to secure sql server?
Explain what are the authentication modes in sql server?
How do use Having,Group by,Group function in SQL?