Another way of getting Row Serial Number

Posted by Rajesh_Kumar under Sql Server category on | Points: 40 | Views : 709
Adding Identity column to the Temp Table

Select RowNum = Identity(Int,1,1),project_name,budget,client_name,project_code,project_description,project_st_date,project_end_date
Into #TEMP
From Project_Master

Select * From #TEMP Order By RowNum
Drop Table #TEMP

Note:This will work only if there is no Identity column defined in the table.

Comments or Responses

Login to post response