create table `think_app`(
-> `aid` int(11) not null auto_increment,
-> `appname`varchar(255) not null,
-> `appkey`varchar(255) not null,
-> `banben`varchar(255) not null,
-> `qudao`int(11) not null,
-> `url`varchar(255) not null,
-> `iskaifang` enum(“0″,”1”) not null default “0”,
-> `starttime`varchar(255) not null,
-> `endtime`varchar(255) not null,
-> `everydaytime`set(“1″,”2″,”3″,”4″,”5″,”6″,”7″,”8″,”9″,”10″,”11″,”12″,”13″,”14″,”15″,”16″,”17″,”18″,”19″,”20″,”21″,”22″,”23″,”24”)not null,
-> `everymonthtoufang`int(11) not null,
-> `pinci`int(11) not null,
-> `del` enum(“0″,”1”) not null default “0”,
-> PRIMARY KEY (`aid`)
-> )ENGINE=MyISAM auto_increment=1 default;
ERROR 1064 (42000): 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 “” at line 16
-> `aid` int(11) not null auto_increment,
-> `appname`varchar(255) not null,
-> `appkey`varchar(255) not null,
-> `banben`varchar(255) not null,
-> `qudao`int(11) not null,
-> `url`varchar(255) not null,
-> `iskaifang` enum(“0″,”1”) not null default “0”,
-> `starttime`varchar(255) not null,
-> `endtime`varchar(255) not null,
-> `everydaytime`set(“1″,”2″,”3″,”4″,”5″,”6″,”7″,”8″,”9″,”10″,”11″,”12″,”13″,”14″,”15″,”16″,”17″,”18″,”19″,”20″,”21″,”22″,”23″,”24”)not null,
-> `everymonthtoufang`int(11) not null,
-> `pinci`int(11) not null,
-> `del` enum(“0″,”1”) not null default “0”,
-> PRIMARY KEY (`aid`)
-> )ENGINE=MyISAM auto_increment=1 default;
ERROR 1064 (42000): 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 “” at line 16
解决方案
10
default 后面的参数呢 去掉default
10
最后一行的default删掉
20
mysql> create table `think_app`( -> `aid` int(11) not null auto_increment, -> `appname`varchar(255) not null, -> `appkey`varchar(255) not null, -> `banben`varchar(255) not null, -> `qudao`int(11) not null, -> `url`varchar(255) not null, -> `iskaifang` enum("0","1") not null default "0", -> `starttime`varchar(255) not null, -> `endtime`varchar(255) not null, -> `everydaytime`set("1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19","20","21","22","23","24")not null, -> `everymonthtoufang`int(11) not null, -> `pinci`int(11) not null, -> `del` enum("0","1") not null default "0", -> PRIMARY KEY (`aid`) -> )ENGINE=MyISAM auto_increment=1; Query OK, 0 rows affected (0.03 sec) mysql>