Patch a document with json_set().
Section: Update and expand JSON
Update or insert a JSON field
sql
sql
UPDATE settings
SET config = json_set(config, '$.theme', 'dark')
WHERE user_id = 1;Explanation
A practical way to update JSON without replacing the whole document in app code.
Learn the surrounding workflow
Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.
Related commands
Same sheet · prioritizing Update and expand JSON