`
zhangyouzhi
  • 浏览: 18769 次
  • 性别: Icon_minigender_1
  • 来自: 上海
文章分类
社区版块
存档分类
最新评论

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server versi

 
阅读更多

执行:

create table hsnl_db.hsnl_resource(
res_id int not null primary key auto_increment,
res_name varchar(64) not null,
res_type char(1) not null,
res_flag char(1) not null default '1',
res_img_url varchar(64),
res_app_url varchar(64),
res_size varchar(8) not null,
res_num int(8) default 0,
res_xz_integral int(2),
res_tj_integral int(2),
res_cgtj_integral int(2),
res_priority int(1) default 0,
res_introduce varchar(1024),
res_package varchar(256),
res_createtime timestamp default now()
);

报错信息:

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 'int(8) default 0

解决办法:res_num int(8) default 0, 改为res_num int default 0, 即可。

执行结果如下图:





分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics