This statement checks the creation information of the doris built-in database or catalog database.
SHOW CREATE DATABASE [<catalog>.]<db_name>;
** 1. <db_name>**
Database Name
** 1. <catalog>**
Indicates whether the table is internal or external
| Column | Description |
|---|---|
| Database | Database Name |
| Create Database | Corresponding database creation statement |
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 |
View the creation of the test database in doris
SHOW CREATE DATABASE test;
+----------+------------------------+ | Database | Create Database | +----------+------------------------+ | test | CREATE DATABASE `test` | +----------+------------------------+
View the creation information of the database hdfs_text in the hive catalog
SHOW CREATE DATABASE hdfs_text;
+-----------+------------------------------------------------------------------------------------+ | Database | Create Database | +-----------+------------------------------------------------------------------------------------+ | hdfs_text | CREATE DATABASE `hdfs_text` LOCATION 'hdfs://HDFS1009138/hive/warehouse/hdfs_text' | +-----------+------------------------------------------------------------------------------------+