2016-02-09 78 views
0
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表?mysql創建表並獲取錯誤1064

+0

只是把','後** grade_1 INT(3)默認爲NULL ** –

+0

仍然不工作 – doric2000

+0

只是複製我的答案並嘗試 –

回答

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

只是把,grade_1 INT(3)默認爲NULL

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) 
);