alter table `limited` add constraint fk_limited_goods_id foreign key(goods_id) references `goods`(id);
mysql8.0转旧版本的验证方式
8.0安全验证方式:
caching_sha2_password
1
ALTER USER 'root'@'%' IDENTIFIED WITH mysql_native_password BY 'sdb@2019';
concat用法
1
select concat('{value:\'',code,'\',label:\'',name,'\',children:[',(select concat(GROUP_CONCAT(CONCAT('{value:\'',b.code,'\',label:\'',b.name,'\'}')),']},') from area b where b.parent_code=a.code group by b.parent_code)) from area a where layer=0