JSON_INSERT
You are viewing an old version of this article. View
the current version here.
MariaDB starting with 10.2.3
JSON functions were added in MariaDB 10.2.3.
Syntax
JSON_INSERT(json_doc, path, val[, path, val] ...)
Description
Inserts data into a JSON document, returning the resulting document or NULL if any argument is null.
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]"} | +--------------------------------------+
Comments
Comments loading...
Content reproduced on this site is the property of its respective owners,
and this content is not reviewed in advance by MariaDB. The views, information and opinions
expressed by this content do not necessarily represent those of MariaDB or any other party.