目录
pg执行update select时报错
ERROR: column "a" of relation "table2" does not exist
UPDATE table1 a SET a.order_no =b.order_no from table2 b
WHERE b.serial_no = a.order_no
set不能使用别名,即使定义了别名也不生效
UPDATE table1 a SET order_no =b.order_no from table2 b
WHERE b.serial_no = a.order_no;
update 待更新表 a
set 待更新表_字段一 = b.字段一
from 关联表 b
where a.关联字段= b.关联字段
;