方法1:
update address set city_name= b.county_name from address,address b where (LEFT(address.address_code,4)=LEFT(b.address_code,4) and b.address_type=2 and address_type=3)
方法2:
update address set city_name=(select top 1 county_name from address b where LEFT(b.address_code,4)=LEFT(address.address_code,4) and b.address_type=2 ) where address_type=3
方法1效率高些。