自从我尝试将此代码粘贴到 phpmyadmin 数据库中时执行 SQL 以来,它不会创建我得到错误的表:
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NOT NULL PRIMARY KEY, WORKER CHAR(30), CONSTRAINT WORKER_FK FOREIGN KEY(WORKE' at line 2
这是 sql 表的代码:
CREATE TABLE REPORT(
REPORT_ID NOT NULL PRIMARY KEY,
WORKER CHAR(30) CONSTRAINT WORKER_FK FOREIGN KEY(WORKER) REFERENCES WORKER(WORKER_ID)
ON UPDATE CASCADE
ON DELETE SET NULL,
CLIENT CHAR (30) CONSTRAINT CLIENT_FK FOREIGN KEY(client) REFERENCES CLIENT(CLIENT_ID)
ON UPDATE CASCADE
ON DELETE SET NULL,
START_DATE DATE CONSTRAINT STARTDATE_FK FOREIGN KEY(JOB) REFERENCES JOB(START_DATE)
ON UPDATE CASCADE
ON DELETE SET NULL,
END_DATE DATE CONSTRAINT ENDDATE_FK FOREIGN KEY(JOB) REFERENCES JOB(END_DATE)
ON UPDATE CASCADE
ON DELETE SET NULL,
COMMENT CHAR(30)
)engine innoDB;
谁能帮帮我