我正在学习SQL,而且我遇到了一些错误。这是我的代码:
create table EMPLOYEE_tcs
(
SSN_Number char(9) Not Null,
First_Name varchar(15) Not Null,
Mid_Name char,
Last_Name varchar(15) Not Null,
Birthday Date,
Address varchar(50),
Gender Char Check(gender = 'M' or gender = 'F' or gender = 'm' or gender = 'f'),
Salary money Default '80000',
Supervisor_SSN Char(9),
Department_Number Int
Constraint pk_emp Primary Key (SSN_Number)
Constraint fk_Supervisor Foreign Key (Supervisor_SSN) EMPLOYEE_tcs (SSN_Number) ON DELETE SET NULL
);
我不断收到错误消息:
介绍FOREIGN KEY约束' fk_Supervisor'桌子上 ' EMPLOYEE_tcs'可能会导致循环或多个级联路径。指定ON DELETE NO ACTION或ON UPDATE NO ACTION,或修改其他FOREIGN KEY 约束
我不知道这意味着什么,我也不知道如何修复它。