このコードを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;
誰でも私を助けてくれますか