0
我需要更新表中的多个行。Postgres更新多行
我有表customer
和contact
我需要更新customer
其中在contact
表中的链接接触具有一定值的列city
。 我能得到我需要与此查询
Select cus.id, con.city
from customer cus, contact con
where cus.contacts_id=con.id
and con.city="MyValue"
我知道如何更新一个表,但是不知道如何更新表时,行是从不同的表中查找行。
'和con.city = “myvalue的”'会导致错误,除非你有一个名为列'某处MyValue'。字符串常量需要用SQL中的单引号引起来。 –