February 19, 2007 at 12:58 am
Hello All,
I want to modify the existing column name from my table through T-sql. without loosing my data.
Plz help me out.
February 19, 2007 at 2:46 am
USE sp_rename built in function.
Ex:
USE AdventureWorks;GOEXEC sp_rename 'Sales.SalesTerritory.TerritoryID', 'TerrID', 'COLUMN';GO
February 19, 2007 at 6:18 am
Yep... then make sure that you rename the column in every stored procedure, view, UDF, foreign key, etc, that uses that column in all databases...
--Jeff Moden
Change is inevitable... Change for the better is not.
February 20, 2007 at 1:43 am
Thx For your usefull guideline. It worked.
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply