How do I drop a foreign key constraint only if it exists in sql server?

前端 未结 11 1624
礼貌的吻别
礼貌的吻别 2020-12-04 05:34

I can drop a table if it exists using the following code but do not know how to do the same with a constraint:

IF EXISTS(SELECT 1 FROM sys.objects WHERE OBJE         


        
11条回答
提交回复
热议问题