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

本文介绍了如何在SQLServer中查询表'WC_User'的外键约束,并提供了删除特定外键约束的具体步骤。通过执行存储过程和SQL语句,可以有效地管理和调整数据库中的外键关系。
3342

被折叠的 条评论
为什么被折叠?



