【发布时间】:2020-07-24 03:41:00
【问题描述】:
为什么这个 postgresql 语句不起作用?
with updatedcontacts (contact_id, list_id, firstname) as
values (13680724,457,'James'),(13680723,457,'Stanley')
update contacts c
set c.firstname = u.firstname
from updatedcontacts u
where u.contact_id = c.contact_id
and u.list_id = c.list_id;
抛出错误:
错误:“值”处或附近的语法错误第 52 行:...updatedcontacts (contact_id, list_id, firstname) 作为值 ( ^ SQL 状态:42601 字符:2944
【问题讨论】:
标签: sql postgresql sql-update common-table-expression