mysql.help_topic Table
The mysql.help_topic table stores the detailed content of help topics, including descriptions and examples displayed by the HELP command.
Field
Type
Null
Key
Default
Description
Example
SELECT * FROM help_topic\G;
...
*************************** 704. row ***************************
help_topic_id: 692
name: JSON_DEPTH
help_category_id: 41
description: JSON functions were added in MariaDB 10.2.3.
Syntax
------
JSON_DEPTH(json_doc)
Description
-----------
Returns the maximum depth of the given JSON document, or
NULL if the argument is null. An error will occur if the
argument is an invalid JSON document.
Scalar values or empty arrays or objects have a depth of 1.
Arrays or objects that are not empty but contain only
elements or member values of depth 1 will have a depth of 2.
In other cases, the depth will be greater than 2.
Examples
--------
SELECT JSON_DEPTH('[]'), JSON_DEPTH('true'),
JSON_DEPTH('{}');
+------------------+--------------------+------------------+
| JSON_DEPTH('[]') | JSON_DEPTH('true') |
JSON_DEPTH('{}') |
+------------------+--------------------+------------------+
| 1 | 1 | 1 |
+------------------+--------------------+------------------+
SELECT JSON_DEPTH('[1, 2, 3]'), JSON_DEPTH('[[], {},
[]]');
+-------------------------+----------------------------+
| JSON_DEPTH('[1, 2, 3]') | JSON_DEPTH('[[], {}, []]') |
+-------------------------+----------------------------+
| 2 | 2 |
+-------------------------+----------------------------+
SELECT JSON_DEPTH('[1, 2, [3, 4, 5, 6], 7]');
+---------------------------------------+
| JSON_DEPTH('[1, 2, [3, 4, 5, 6], 7]') |
+---------------------------------------+
| 3 |
+---------------------------------------+
URL: https://mariadb.com/kb/en/json_depth/
example:
url: https://mariadb.com/kb/en/json_depth/Last updated
Was this helpful?

