Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
remove properties from jsonb using function jsonb_set of PostgreSQL
drop table if exists account; create table account(name text, data jsonb); insert into account values ('1', '{"flags": {"name": "john", "type": "food", "pay": true, "convert": true}, "level": 1}'), ('9', '{"flags": {"name": "b", "type": "drink", "pay": false, "convert": true, "form1": true}, "level": 8}'); update account set data = jsonb_set(data, '{flags}', (data->'flags') - 'convert' - 'form1') where data->'flags'->>'convert' = 'true'; select * from account;
run
|
edit
|
history
|
help
0
Ultima Clase
SQL3
FlujoPadre
xD
lol
univesp
Assignment 1(SET A)
Black Wall
postgresql example hierarchy with addresses
Select all countries that can be found by recursively adding all neighbouring countries (PostgreSQL)