1. 取A表的数据,更新B表字段
update m_build b
set b.district_id=(
select d.district_id
from
bjhouse.d_district d
where
b.build_name_jq=d.district_name)
where exists
(select 1
from
bjhouse.d_district d
where
b.build_name_jq=d.district_name)
1. 取A表的数据,更新B表字段
update m_build b
set b.district_id=(
select d.district_id
from
bjhouse.d_district d
where
b.build_name_jq=d.district_name)
where exists
(select 1
from
bjhouse.d_district d
where
b.build_name_jq=d.district_name)