# mysql.help\_topic Table

`mysql.help_topic` is one of the four tables used by the [HELP command](/docs/server/reference/sql-statements/administrative-sql-statements/help-command.md). It is populated when the server is installed by the `fill_help_tables.sql` script. The other help tables are [help\_relation](/docs/server/reference/system-tables/the-mysql-database-tables/mysql-help_relation-table.md), [help\_category](/docs/server/reference/system-tables/the-mysql-database-tables/mysql-help_category-table.md) and [help\_keyword](/docs/server/reference/system-tables/the-mysql-database-tables/mysql-help_keyword-table.md).

This table uses the [Aria](/docs/server/server-usage/storage-engines/aria.md) storage engine.

The `mysql.help_topic` table contains the following fields:

| Field              | Type                 | Null | Key | Default | Description |
| ------------------ | -------------------- | ---- | --- | ------- | ----------- |
| help\_topic\_id    | int(10) unsigned     | NO   | PRI | NULL    |             |
| name               | char(64)             | NO   | UNI | NULL    |             |
| help\_category\_id | smallint(5) unsigned | NO   |     | NULL    |             |
| description        | text                 | NO   |     | NULL    |             |
| example            | text                 | NO   |     | NULL    |             |
| url                | char(128)            | NO   |     | NULL    |             |

## Example

```sql
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/
```

<sub>*This page is licensed: CC BY-SA / Gnu FDL*</sub>

{% @marketo/form formId="4316" %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://mariadb.com/docs/server/reference/system-tables/the-mysql-database-tables/mysql-help_topic-table.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
