📜  postgresql 更新 json 字段键值 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:01:58.590000             🧑  作者: Mango

代码示例1
UPDATE table_name SET attrs = jsonb_set(cast(attrs as jsonb), '{key}', '"new_value"', true) WHERE id = 'some_id';