update同一张表的例子

场景: 业务中台--的bd_area表需要把pk_parent(父id)字段更新 解决sql: -- 二级更新 update bd_area a LEFT JOIN (select b.id,substr(b.area_code,1,2) as bcode,substr(b.tree_code,1,3) as btcode from bd_area b where LENGTH(b.tree_co
相关文章
相关标签/搜索