Database Json类型列元素更新-Postgres
我在更新json类型的列元素值时遇到问题Database Json类型列元素更新-Postgres,database,postgresql,sql-update,postgresql-9.4,Database,Postgresql,Sql Update,Postgresql 9.4,我在更新json类型的列元素值时遇到问题 UPDATE employer SET address->>'locality' = 'NYC' where "Id"='30' address是jsonb类型的列,具有以下元素 {"region": "", "locality": "", "postal-code": "", "country-name": "CAN", "street-address": ""} 那么,如何更新这个地址列中的locality元素呢 注;我正在使用Pos
UPDATE employer SET address->>'locality' = 'NYC' where "Id"='30'
address是jsonb类型的列,具有以下元素
{"region": "", "locality": "", "postal-code": "", "country-name": "CAN", "street-address": ""}
那么,如何更新这个地址列中的locality元素呢
注;我正在使用Postgres9.4
谢谢我没有更新jsonB元素的选项。我需要更新整个jsonb对象 谢谢