可能重复:
外键约束可能导致循环或多个级联路径?
创建下表时出现以下错误。
消息 1785,级别 16,状态 0,第 1 行在表 'Faculty' 上引入 FOREIGN KEY 约束 'FKFacSupervisor' 可能会导致循环或多个级联路径。指定 ON DELETE NO ACTION 或 ON UPDATE NO ACTION,或修改其他 FOREIGN KEY 约束。消息 1750,级别 16,状态 0,行 1 无法创建约束。请参阅以前的错误。
CREATE TABLE Faculty
(
FacNo CHAR (11),
FacFirstName VARCHAR (50)CONSTRAINT FacFirstNameRequired NOT NULL,
FacLastName VARCHAR (50) CONSTRAINT FacLastNameRequired NOT NULL,
FacCity VARCHAR (50) CONSTRAINT FacCityRequired NOT NULL,
FacState CHAR (2) CONSTRAINT FacStateRequired NOT NULL,
FacZipCode CHAR (10) CONSTRAINT FacZipCodeRequired NOT NULL,
FacHireDate DATE,
FacDept CHAR (6),
FacRank CHAR (4),
FacSalary DECIMAL (10,2),
FacSupervisor CHAR (11),
CONSTRAINT PKFaculty PRIMARY KEY (FacNo),
CONSTRAINT FKFacSupervisor FOREIGN KEY (FacSupervisor) REFERENCES Faculty
ON DELETE SET NULL
ON UPDATE CASCADE
)