SELECT ROW_NUMBER() OVER (ORDER BY ColumnName1) As SrNo, ColumnName1, ColumnName2 FROM TableName
SELECT identity(int,1,1) as [Serial#], 'Hello' AS [MyColumn] INTO #temp
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)