为什么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;
抛出错误:
错误:“values”行52处或附近出现语法错误:…updatedcontacts(contact\u id,list\u id,firstname)作为值(^sql state:42601 character:2944)
1条答案
按热度按时间b0zn9rqh1#
values
应该用附加括号括起来: