Comments
1 comment
-
In most cases SQL Compare will already do this automatically, and will use the EXEC sp_rename command, I have tested this with the very latest version (13.7.4), but the behavior should be identical in the version that you are using:
<div>PRINT N'Altering [dbo].[T1]' </div><div>GO </div><div>IF @@ERROR <> 0 SET NOEXEC ON </div><div>GO </div><div>EXEC sp_rename N'[dbo].[T1].[C2]', N'C4', N'COLUMN'</div>
If this isn't happening in your case, please post some reproduction steps.
There might be some SQL Compare options that change this behavior, apart from that the only way to do this would be to create a deployment script and then update the script manually.
Add comment
Please sign in to leave a comment.
Is there a property or setting that I'm not seeing, or does anyone have a suggestion on how to solve my problem programmatically? I'd like to avoid doing this manually for 300 tables, if possible. This is a SQL Server 2014 db.