我有两张桌子,
users
和
profiles
. 我想开始
profiles.verified
到
true
如果
users.emails
在列表中
('email1','email2',...)
.
灵感来源于其他类似
updating table rows in postgres using subquery
我一直在尝试做一些事情,
UPDATE
profiles p1
SET
verified = true
FROM
profiles p2
INNER JOIN users u1 on u1.id = p2.user_id
WHERE
u1.email in ('email1','email2',...)
但它只是更新
配置文件。已验证
到
真
对于中的所有记录
轮廓
.
我怎么才能只更新
profile
记录,如果它们与
用户
在指定列表中记录电子邮件?