MySQL tutorial: JSON_ARRAY [EN]
top of page
CerebroSQL

MySQL: 

JSON_ARRAY

Syntax:
JSON_ARRAY([val[, val] ...])

Evaluates a (possibly empty) list of values and returns a JSON array
containing those values.

URL: https://dev.mysql.com/doc/refman/8.0/en/json-creation-functions.html

Example

mysql> SELECT JSON_ARRAY(1, "abc", NULL, TRUE, CURTIME());
+---------------------------------------------+
| JSON_ARRAY(1, "abc", NULL, TRUE, CURTIME()) |
+---------------------------------------------+
| [1, "abc", null, true, "11:30:24.000000"] |
+---------------------------------------------+

bottom of page