关于mysql的sql语句符号问题
在MySQL里面使用sql语句是用的不是单引号-->',而用的是反但引符号-->`。
例如
CREATE TABLE 'my_admin'(
'id' tinyint unsigned auto_increment key,
'usename' varchar(20) not null unique,
'password' char(32) not null,
'email' varchar(50) not null
)engine=innodb default charset=utf8;
会出现这个错误: #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 ''my_admin'( 'id' tinyint unsigned auto_increment key, 'usename' varchar(20) no' at line 1
应该用
CREATE TABLE `my_admin`(
`id` tinyint unsigned auto_increment key,
`usename` varchar(20) not null unique,
`password` char(32) not null,
`email` varchar(50) not null
)engine=innodb default charset=utf8;
这样就不会报错了。