SHOW DATABASES
Descriptionβ
Views databases in your current StarRocks cluster or an external data source. StarRocks supports viewing databases of an external data source from v2.3 onwards.
Syntaxβ
SHOW DATABASES [FROM <catalog_name>]
Parametersβ
| Parameter | Required | Description | 
|---|---|---|
| catalog_name | No | The name of the internal catalog or an external catalog. 
 | 
Examplesβ
Example 1: View databases in your current StarRocks cluster.
SHOW DATABASES;
Or
SHOW DATABASES FROM default_catalog;
The output of the preceding statements is as follows.
+----------+
| Database |
+----------+
| db1      |
| db2      |
| db3      |
+----------+
Example 2: View databases in a Hive cluster by using the Hive1 external catalog.
SHOW DATABASES FROM hive1;
+-----------+
| Database  |
+-----------+
| hive_db1  |
| hive_db2  |
| hive_db3  |
+-----------+