json_array
description
Syntax
VARCHAR json_array(VARCHAR,...)
生成一个包含指定元素的json数组,未指定时返回空数组
example
1. MySQL> select json_array();
2. +--------------+
3. | json_array() |
4. +--------------+
5. | [] |
6. +--------------+
8. MySQL> select json_array(null);
9. +--------------------+
10. | json_array('NULL') |
11. +--------------------+
12. | [NULL] |
13. +--------------------+
16. MySQL> SELECT json_array(1, "abc", NULL, TRUE, CURTIME());
17. +-----------------------------------------------+
18. | json_array(1, 'abc', 'NULL', TRUE, curtime()) |
19. +-----------------------------------------------+
20. | [1, "abc", NULL, TRUE, "10:41:15"] |
21. +-----------------------------------------------+
24. MySQL> select json_array("a", null, "c");
25. +------------------------------+
26. | json_array('a', 'NULL', 'c') |
27. +------------------------------+
28. | ["a", NULL, "c"] |
29. +------------------------------+
keywords
json_array
