Run Code
|
API
|
Code Wall
|
Users
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Blog
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
1
raja
by prasanthjohn, 8 months ago
Please
log in
to post a comment.
1097. Game Play Analysis V
code1
Ass2 q2
Studco
Demande complète
1
Correlated subquery in SELECT clause, and rewritten for Netezza
Conditional Cross Join - Why doesn't this work on the 'ON' clause?
PostreSQL: Today's Date/Time
SQL social network practice by Han Wang 20200720
raja
by prasanthjohn, 8 months agoPlease log in to post a comment.