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
相關文章
相關標籤/搜索