IF  EXISTS (SELECT * FROM sys.foreign_keys WHERE object_id = OBJECT_ID(N'[dbo].[FK_tbTable01_tbTable02]') AND parent_object_id = OBJECT_ID(N'[dbo].[tbTable01]'))
	ALTER TABLE dbo.tbTable01 
	DROP CONSTRAINT FK_tbTable01_tbTable02;
GO
Last modified: May 3, 2021

Author

Comments

Write a Reply or Comment