Jun 19, 2008 #1 sandylou Programmer Jan 18, 2002 147 US Besides sp_rename, is there a scripting method to rename a field in a table?
Jun 19, 2008 #2 mrdenny Programmer May 27, 2002 11,595 That would be the easiest way. The other option would be to create a new table with the new column name, and move the data over, then drop the old table and rename the new table. Denny MCSA (2003) / MCDBA (SQL 2000) MCTS (SQL 2005 / Microsoft Windows SharePoint Services 3.0: Configuration / Microsoft Office SharePoint Server 2007: Configuration) MCITP Database Administrator (SQL 2005) / Database Developer (SQL 2005) My Blog Upvote 0 Downvote
That would be the easiest way. The other option would be to create a new table with the new column name, and move the data over, then drop the old table and rename the new table. Denny MCSA (2003) / MCDBA (SQL 2000) MCTS (SQL 2005 / Microsoft Windows SharePoint Services 3.0: Configuration / Microsoft Office SharePoint Server 2007: Configuration) MCITP Database Administrator (SQL 2005) / Database Developer (SQL 2005) My Blog