我正在尝试使用"在删除"上创建一个新表和"更新"引用触发的操作,但它一直说有语法错误。当我尝试运行脚本时,错误消息是"缺少右括号"。我不明白为什么这不对。
CREATE TABLE PERSON
(SSN VARCHAR(9) NOT NULL,
Name VARCHAR(20) NOT NULL,
Phone VARCHAR(10),
Address VARCHAR(40),
Employer VARCHAR(20),
Insurer VARCHAR(20),
PCP INT,
CONSTRAINT PERPPK
PRIMARY KEY(SSN),
CONSTRAINT PEREMPFK
FOREIGN KEY(Employer) REFERENCES EMPLOYER(Name)
ON DELETE SET NULL ON UPDATE CASCADE,
CONSTRAINT PERINSFK
FOREIGN KEY(Insurer) REFERENCES INSURER(Name)
ON DELETE SET NULL ON UPDATE CASCADE,
CONSTRAINT PERPCP
FOREIGN KEY(PCP) REFERENCES PHYSICIAN(PID)
ON DELETE SET NULL ON UPDATE CASCADE);