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
相关文章: