一个关于mysql建表的问题,一直错误,求大神给分析一下
create table if not exists 'goods' (
'goods_id' int(10) unsigned NOT NULL AUTO_INCREMENT,
'goods_sn' char(15) not null default '',
'cat_id' smallint(6) not null default '0',
'brand_id' smallint(6) not null default '0',
'goods_name' varchar(30) not null default '',
'shop_price' decimal(9,2) not null default '0.00',
'market_price' decimal(9,2) not null default '0.00',
'goods_number' smallint(6) not null default '1',
'click_count' mediumint(9) not null default '0',
'goods_weight' decimal(6.3) not null default '0.000',
'goods_brief' varchar(100) not null default '',
'goods_desc' text not null,
'thumb_img' varchar(30) not null default '',
'goods_img' varchar(30) not null default '',
'ori_img' varchar(30) not null default '',
'is_on_sale' tinyint(4) not null default '1',
'is_delete' tinyint(4) not null default '0',
'is_best' tinyint(4) not null default '0',
'is_new' tinyint(4) not null default '0',
'is_hot' tinyint(4) not null default '0',
'add_time' int(10) unsigned not null default '0',
'last_update' int(10) unsigned not null default '0',
primary key ('goods_id'),
unique key 'goods_sn' ('goods_sn')
)engine=myisam default charset=utf8;
上述语句建表有什么问题?为什么每次建表就出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 ''goods' (
'goods_id' int(10) unsigned NOT NULL AUTO_INCREMENT,
如果你对这篇文章有疑问,欢迎到本站 社区 发帖提问或使用手Q扫描下方二维码加群参与讨论,获取更多帮助。

发布评论
需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。