A,B两张表,可以连接,B表字段b1可以为空,现要把B表中b1字段为空的数据赋值为A表字段a1的值

感谢
2025-01-04 09:27:08
推荐回答(1个)
回答1:

update B b set b1 = (select a1 from A a where a.id = b.关联id) where b.b1 is null