pgsql 连表更新 亲测可用. #注意set 后边的字段不能写成a.code,会报错 update pay as a set code =b.id from user b where a.key =b.key and a.key is null;