update sys_menu m1,sys_menu m2
set m1.ancestors=CONCAT(m2.ancestors,',',m1.parent_id)
where m1.parent_id=m2.menu_id and m1.ancestors is NULL
MySQL 联合更新
猜你喜欢
转载自blog.csdn.net/chengmin123456789/article/details/107784537
今日推荐
周排行