Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

postgresql update json field key value

UPDATE table_name SET attrs = jsonb_set(cast(attrs as jsonb), '{key}', '"new_value"', true) WHERE id = 'some_id'; 
 
PREVIOUS NEXT
Tagged: #postgresql #update #json #field #key
ADD COMMENT
Topic
Name
2+1 =