更新区域代码code
程序员文章站
2022-07-08 12:24:55
...
--1
update o2o_shop_info_app a set citycode=(select id from shop_area b
where a.city1=b.areaname
)
where pt_name='饿了么h5' and province1='河北省'
--2
update o2o_shop_info_app a set adcode=(select id from shop_area b
where b.areaname=a.district and
a.citycode =b.parentid
)
where pt_name='饿了么h5' and province1='河北省'
update o2o_shop_info_app a set citycode=(select id from shop_area b
where a.city1=b.areaname
)
where pt_name='饿了么h5' and province1='河北省'
--2
update o2o_shop_info_app a set adcode=(select id from shop_area b
where b.areaname=a.district and
a.citycode =b.parentid
)
where pt_name='饿了么h5' and province1='河北省'
下一篇: 三亚数据库统计sql