Run the following simple query
with t1 as ( select 0 as a ) select version(), JSON_ARRAYAGG(a) as j from t1 where a > 0;
Example:
MariaDB [(none)]> with t1 as ( select 0 as a ) select version(), JSON_ARRAYAGG(a) as j from t1 where a > 0; +-----------------+------+ | version() | j | +-----------------+------+ | 10.5.13-MariaDB | NULL | +-----------------+------+ 1 row in set (0.002 sec)
If it doesn’t support you should get:
MariaDB [(none)]> with t1 as ( select 0 as a ) select version(), JSON_ARRAYAGG(a) as j from t1 where a > 0; ERROR 1305 (42000): FUNCTION JSON_ARRAYAGG does not exist
Source: https://mariadb.com/kb/en/json_arrayagg/
Similar Posts:
- How to run shell commands from the inside MySQL command line
- How to calculate innodb_buffer_pool_size value
- How to enable Slow Query Log
- How to tune/calculate table_open_cache, open_files_limit, table_definition_cache, table_open_cache_instances
- How to get rid of Mariadb Aborted connection Got an error reading communication packets