VeloDB Cloud 26.x·Apache Doris 4.x (up to 4.0 supported)·"Since X.Y" tags refer to Apache Doris versionsVersion mapping
SHOW DATABASES
Description
This statement is used to display the currently visible database.
Syntax
SHOW DATABASES [FROM <catalog>] [<filter_expr>];
Optional parameters
** 1. <catalog>**
Corresponding catalog
** 2. <filter_expr>**
Filter by specified conditions
Return Value
| Column | Description |
|---|---|
| Database | Database Name |
Permission Control
The user executing this SQL command must have at least the following permissions:
| Permissions | Object | Notes |
|---|---|---|
| SELECT_PRIV | Corresponding database | Requires read permission on the corresponding database |
Examples
-
Displays the names of all current databases.
SHOW DATABASES;+--------------------+
| Database |
+--------------------+
| test |
| information_schema |
+--------------------+ -
Will display all database names in
hms_catalog.SHOW DATABASES FROM hms_catalog;+---------------+
| Database |
+---------------+
| default |
| tpch |
+---------------+ -
Displays the names of all databases currently filtered by the expression
like 'infor%'.SHOW DATABASES like 'infor%';+--------------------+
| Database |
+--------------------+
| information_schema |
+--------------------+