- update table1
- set town=(select town from table2 where table2 .id=table1.id)
- where exists (select 1 from table2 where table2 .id=table1.id)
-
- update table1
- set town = (select town from table2 where wwm5.id = table1.id)
- where id = (select table2.id from table2 where wwm5.id = table1.id)
update
(select a.region_no org, b.region_no new
from clients a, cli_reg_addr_match b
where a.client_no = b.client_no)
set org = new
(select a.region_no org, b.region_no new
from clients a, cli_reg_addr_match b
where a.client_no = b.client_no)
set org = new
创建主键。。
本文介绍了一种使用SQL更新表中特定字段的方法,通过联接不同表并利用子查询来实现数据同步更新,确保了数据的一致性和准确性。
877

被折叠的 条评论
为什么被折叠?



