mysql创建表并获取错误1064

时间:2016-02-09 13:14:39

标签: mysql

CREATE TABLE course000 (
id_number int(9) unsigned zerofill NOT NULL default '000000000',
grade_1 int(3) default NULL,
grade_2 int(3) default NULL,
grade_final int(3) default NULL,
PRIMARY KEY (id_number)
);

请帮帮我;为什么我不能用这段代码来构建mysql表?

2 个答案:

答案 0 :(得分:0)

grade_1 int(3) default NULL//you have missing ,(comma here)

答案 1 :(得分:0)

只需将,放在 grade_1 int(3)默认值

之后
CREATE TABLE course000 (
id_number int(9) unsigned zerofill NOT NULL default '000000000',
grade_1 int(3) default NULL,
grade_2 int(3) default NULL,
grade_final int(3) default NULL,
PRIMARY KEY (id_number)
);