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
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/8176642.html