以下sql是a,b两张表通过关联条件id修改a表值,红色条件为附加限制条件,具体视情况而定;
UPDATE a SET
name = b.fname,
pwd = b.lname
FROM b
WHERE a.id = b.id
AND a.id in (2,3)
时间: 2024-11-14 11:57:04
以下sql是a,b两张表通过关联条件id修改a表值,红色条件为附加限制条件,具体视情况而定;
UPDATE a SET
name = b.fname,
pwd = b.lname
FROM b
WHERE a.id = b.id
AND a.id in (2,3)