SQL Server查询外键约束与删除外键约束:
'WC_User'是表名
exec sp_helpconstraint 'WC_User'
select name from sys.foreign_key_columns f join sys.objects o on f.constraint_object_id=o.object_id where f.parent_object_id=object_id('WC_User')
alter table WC_User drop constraint FK_WC_User_WC_OfficalAccounts
转载请注明原文地址: https://ju.6miu.com/read-675773.html