--禁用所有约束
exec sp_msforeachtable ’alter table ? nocheck CONSTRAINT all’
--再启用所有外键约束
exec sp_msforeachtable ’alter table ? check constraint all’
T-SQL_禁用表上的外键约束
阅读 69
2023-03-05
--禁用所有约束
exec sp_msforeachtable ’alter table ? nocheck CONSTRAINT all’
--再启用所有外键约束
exec sp_msforeachtable ’alter table ? check constraint all’
相关推荐
精彩评论(0)