1. 程式人生 > >check the manual that corresponds to your MySQL server version for the right syntax to use near 'TYP

check the manual that corresponds to your MySQL server version for the right syntax to use near 'TYP

建立QUARTZ表時出現如下的問題
CREATE TABLE QRTZ_JOB_DETAILS(
JOB_NAME VARCHAR(80) NOT NULL,
JOB_GROUP VARCHAR(80) NOT NULL,
DESCRIPTION VARCHAR(120) NULL,
JOB_CLASS_NAME VARCHAR(128) NOT NULL,
IS_DURABLE VARCHAR(1) NOT NULL,
IS_VOLATILE VARCHAR(1) NOT NULL,
IS_STATEFUL VARCHAR(1) NOT NULL,
REQUESTS_RECOVERY VARCHAR(1) NOT NULL,
JOB_DATA BLOB NULL,
PRIMARY KEY (JOB_NAME,JOB_GROUP))
TYPE=InnoDB

Error occured at:2018-02-14 15:43:16
Line no.:32
Error Code: 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 ‘TYPE=InnoDB’ at line 12
通過查詢得知mysql版本的問題,在MySQL5.0以前,type=InnoDB是有效的SQL語句,但是自己用的是MySQL5.6版本,type=InnoDB不再有效了。

可將這語句刪除,再執行。

也可以改成 : ENGINE=InnoDB

注:這裡表會採用預設引擎,MySQL5.5.5版本之後採用的預設引擎就是InnoDB