【发布时间】:2012-03-27 21:47:09
【问题描述】:
可能重复:
I got error “The DELETE statement conflicted with the REFERENCE constraint”
我收到错误消息
The DELETE statement conflicted with the REFERENCE constraint fk
是否可以自动删除导致此引用冲突的行,例如设置属性等。避免先删除子项,然后返回并删除要删除的原始行?
【问题讨论】:
-
您需要将外键的删除选项设置为 CASCADE on delete
-
SQL-Server:msdn.microsoft.com/en-us/library/ms186973.aspx 和这里(使用 SSMS):mssqltips.com/sqlservertip/2365/…