mysql问题
在mysql命令窗口输入:
create table encode(id int unsigned not null auto_increment,card_number tinyblob,primary key(id));
显示错误:
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 'enco
e(id int unsigned not null auto_increment,card_number tinyblob,primary key(' at
line 1
请问是为什么?
答案:表名和字段名需要使用``,修改后如下:
create table `encode` (
`id` int unsigned not null auto_increment,
`card_number` tinyblob,
primary key(`id`)
);
其他:改为:试试
CREATE
table encode
(
id int unsigned not null auto_increment primary key,
card_number tinyblob
) ;
上一个:linux下mysql数据库的中文乱码问题
下一个:mysql中运行了查死锁命令,结果如下