SELECT ROW_NUMBER() OVER (ORDER BY ColumnName1) As SrNo, ColumnName1, ColumnName2 FROM TableName
SELECT DENSE_RANK() OVER (ORDER BY ColumnName1) As SrNo, ColumnName1, ColumnName2 FROM TableName
select top 1 ROW_NUMBER()over(orderby col1)as slno,* from tbl1 orderby slno desc
No comments:
Post a Comment