Howdy,
I am testing out the new database project features of Visual Studio 2010 and want to change the name of a column in a table. I changed the name in the create script and deployed it against the database. The script that was generated just dropped the column and added a new column with the correct name, but all the data was lost.
Is there a setting that will not drop the column data?
I am looking for the "DataDude" solution to this issue. (If there is one)
PRINT N'Altering [dbo].[Users]...';
GO
ALTER TABLE [dbo].[Users] DROP COLUMN [TestX];
GO
ALTER TABLE [dbo].[Users]
ADD [Testn] NVARCHAR (50) NULL;
GO
Thank you, Keith