phpmyadmin建表出错 #1064 - You have an error in your SQL syntax;
2010-01-26 00:15
489 查看
语句
CREATE TABLE 'test'(
'id' int( 10 ) NOT NULL AUTO_INCREMENT ,
'uid' varchar(10) NOT NULL default '0',
'regdate' date NOT NULL ,
'remark' text,
PRIMARY KEY ('id')) ENGINE = innodb default CHARSET = gbk AUTO_INCREMENT =5;
可能是mysql版本问题吧,把所有的单引号去掉就不出错了
正确写法:
CREATE TABLE test(
id int( 10 ) NOT NULL AUTO_INCREMENT ,
uid varchar(10) NOT NULL default 0,
regdate date NOT NULL ,
remark text,
PRIMARY KEY (id)) ENGINE = innodb default CHARSET = gbk AUTO_INCREMENT =5
CREATE TABLE 'test'(
'id' int( 10 ) NOT NULL AUTO_INCREMENT ,
'uid' varchar(10) NOT NULL default '0',
'regdate' date NOT NULL ,
'remark' text,
PRIMARY KEY ('id')) ENGINE = innodb default CHARSET = gbk AUTO_INCREMENT =5;
可能是mysql版本问题吧,把所有的单引号去掉就不出错了
正确写法:
CREATE TABLE test(
id int( 10 ) NOT NULL AUTO_INCREMENT ,
uid varchar(10) NOT NULL default 0,
regdate date NOT NULL ,
remark text,
PRIMARY KEY (id)) ENGINE = innodb default CHARSET = gbk AUTO_INCREMENT =5
相关文章推荐
- MySql建表时出错ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that correspond
- 创建存储过程错误(已解决):Error Code : 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server ver
- SQL Error: 1064, SQLState: 42000 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version
- ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your
- ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your
- mysql 存储过程中limit(#1064 You have an error in your SQL syntax)
- ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your
- python2.7 pymysql中 pymysql.err.ProgrammingError:1064, You have an error in your SQL syntax;
- 1064 - You have an error in your SQL syntax; check the manual that correspon解决办法
- Err] 1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL se
- ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your
- [Err] 1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL s
- mysql脚本1064 - You have an error in your SQL syntax; check the manual
- Error Code : 1064 You have an error in your SQL syntax; check the manual that corresponds to your My
- [Err] 1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL s
- [Err] 1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL s
- MySql 执行语句错误 Err] 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
- ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your
- ERROR 1064 (42000): You have an error in your SQL syntax; check the manual...
- 1064 - You have an error in your SQL syntax问题解决