`classname` char(20) NOT NULL default '',会不会出错? 有道理
AUTO_INCREMENT=6 去掉试试。
执行结果: C:\>cd mysqlC:\mysql>cd binC:\mysql\bin>mysql -use=root Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 3 to server version: 4.0.18-ntType 'help;' or '\h' for help. Type '\c' to clear the buffer.mysql> use movie6 Database changed mysql> create table 'snuo_bgclass' ( -> 'filmclass' int(10) unsigned not null auto_increment, -> 'classname' char(20) not null default '', -> primary key ('filmclassid') -> )TYPE=MyISAM AUTO_INCREMENT=6;ERROR 1064: You have an error in your SQL syntax. Check the manual that corresp onds to your MySQL server version for the right syntax to use near ''snuo_bgclas s' ( 'filmclass' int(10) unsigned not null auto_inc mysql>
classname字段类型char长度20 非空
关键字filmclassid
有道理
C:\>cd mysqlC:\mysql>cd binC:\mysql\bin>mysql -use=root
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 3 to server version: 4.0.18-ntType 'help;' or '\h' for help. Type '\c' to clear the buffer.mysql> use movie6
Database changed
mysql> create table 'snuo_bgclass' (
-> 'filmclass' int(10) unsigned not null auto_increment,
-> 'classname' char(20) not null default '',
-> primary key ('filmclassid')
-> )TYPE=MyISAM AUTO_INCREMENT=6;ERROR 1064: You have an error in your SQL syntax. Check the manual that corresp
onds to your MySQL server version for the right syntax to use near ''snuo_bgclas
s' (
'filmclass' int(10) unsigned not null auto_inc
mysql>
我第一次用的,不知道,谢谢.