VeloDB Cloud 26.x·Apache Doris 4.x (up to 4.0 supported)·"Since X.Y" tags refer to Apache Doris versionsVersion mapping
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 |
+------------+