JSON_INSERT
Learn about the JSON_INSERT function in MariaDB. This function inserts new data into a JSON document without replacing existing values, returning the updated document or NULL.
Syntax
JSON_INSERT(json_doc, path, val[, path, val] ...)Description
Examples
SET @json = '{ "A": 0, "B": [1, 2]}';
SELECT JSON_INSERT(@json, '$.C', '[3, 4]');
+--------------------------------------+
| JSON_INSERT(@json, '$.C', '[3, 4]') |
+--------------------------------------+
| { "A": 0, "B": [1, 2], "C":"[3, 4]"} |
+--------------------------------------+See Also
Last updated
Was this helpful?

