Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Replace key of json
create table form ( id integer, data json ); insert into form (id, data) values (1000, $$ {"formType": "DEFAULT", "old_key": {"column": [{"old_key": "1"}, {"old_key": "7"}, {"old_key": "22"}]}} $$::json ) ; SELECT * FROM form; UPDATE form set data = data::jsonb - 'old_key' || jsonb_build_object('new_key', data->'old_key') where data::jsonb ? 'old_key'; SELECT * FROM form;
run
|
edit
|
history
|
help
0
Demo
Descriptor test
Final 1
asd
Final test
Movie Rating SQL Analysis Project
simple add function on sql
generate-data-combinations-for-a-column-dynamically-based-on-another-column-sql-postgresql
pokemo
Sample tables