update
A
set
A.CityRegionID=B.ParentID,
A.CityName=(
select
RegionName
from
Common_Region
where
RegionID=B.ParentID)
from
User_Common_Address A,Common_Region B
where
A.CityRegionID=B.RegionID
原文:https://www.cnblogs.com/cuihongyu3503319/p/9283402.html