其他分享
首页 > 其他分享> > kingbase 跨库连表更新

kingbase 跨库连表更新

作者:互联网

1、安装dblink

2、将一个表的字段更新至另一张表

UPDATE public.information
set public.information.creator_id=admaf.id
from
(
SELECT * FROM dblink('hostaddr=1127.0.0.1 port=54321 dbname=ad user=sys password=12345',
'select account,id from od_user')AS base(account text,id text)
) admaf
where public.information.creator_name=admaf.account

标签:information,account,creator,跨库,kingbase,id,连表,admaf,public
来源: https://www.cnblogs.com/niuniu0108/p/16440758.html