I'm just learning sql and I'm running into some errors. Here's my code:
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
);
I keep getting the error message:
Introducing FOREIGN KEY constraint 'fk_Supervisor' on table 'EMPLOYEE_tcs' may cause cycles or multiple cascade paths. Specify ON DELETE NO ACTION or ON UPDATE NO ACTION, or modify other FOREIGN KEY constraints.
I have no clue what this means and i dont know how to fix it either.