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, 即可。

执行结果如下图:

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server versi_第1张图片



你可能感兴趣的:(You have an error in your SQL syntax; check the manual that corresponds to your MySQL server versi)