SHOW DATABASE ID
Descriptionβ
This statement is used to find the corresponding database name based on the database id (only used by administrators)
Syntaxβ
SHOW DATABASE <database_id>
Required parametersβ
** 1. <database_id>
**
Database corresponding id number
Return Valueβ
Column | Description |
---|---|
DbName | Database Name |
Permission Controlβ
The user executing this SQL command must have at least the following permissions:
Permissions | Object | Notes |
---|---|---|
ADMIN_PRIV | The entire cluster | Requires administrative privileges for the entire cluster |
Exampleβ
-
Find the corresponding database name according to the database id
SHOW DATABASE 10396;
+------------+
| DbName |
+------------+
| example_db |
+------------+