首页 > 数据库 >PostgreSQL update set from 两表联合更新

PostgreSQL update set from 两表联合更新

时间:2023-02-21 13:58:16浏览次数:54  
标签:set PostgreSQL 两表 business ir update application id name

update t_business tb
set system_id = ir.application_id
from t_business_irregular ir
where tb.affected_business = ir.application_name

update t_business tb
set system_id = ir.application_id
from t_business_irregular ir
where tb.fault_system = ir.application_name

update t_business_irregular bi set status = 0 from t_business_standard bs
where bi.application_id = bs.application_id
and bi.application_name = bs.application_name
————————————————
版权声明:本文为CSDN博主「Take^that」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/qq_37767455/article/details/124291453

标签:set,PostgreSQL,两表,business,ir,update,application,id,name
From: https://www.cnblogs.com/telwanggs/p/17140673.html

相关文章