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 the difference between delete and truncate statements?
What are the rules to use the rowguidcol property to define a globally unique identifier column?
Explain few examples of stored procedure over triggers?
How do I find the transaction log size in sql server?
How to stop a loop early with break statements in ms sql server?
When would you use the stored procedures or functions?
What is DCL?
What happens if you add a new index to large table?
Mention what are the different types of ssrs reports?
what is an extended stored procedure? Can you instantiate a com object by using t-sql? : Sql server database administration
What do you understand by intent locks?
Define msdb database?
Explain about link server in sql server?
What stored by the model?
Why are you getting errors when creating a new odbc dsn?