0
点赞
收藏
分享

微信扫一扫

MySQL联表更新

Silence潇湘夜雨 2022-01-07 阅读 47
update A as phg left join B as pb on phg.patient_id = pb.patient_id 
set phg.double_flag = 
case
when pb.live_place_community  =  pb.census_register_community then 0  #否双列管
when pb.live_place_community != pb.census_register_community then 1  #是双列管
end
举报

相关推荐

0 条评论