postgSql 更新操作(更新字段到对应表相应的值)

版权声明:未经允许不得转载。 https://blog.csdn.net/qq_35958788/article/details/84071157

更新字段到对应表相应的值

update identities
set extern_uid = tmp.username
from(select id, username from users)
as tmp (id, username)
where identities.user_id = tmp.id

猜你喜欢

转载自blog.csdn.net/qq_35958788/article/details/84071157
今日推荐