VeloDB Cloud 26.x·Apache Doris 4.x (up to 4.0 supported)·"Since X.Y" tags refer to Apache Doris versionsVersion mapping
SHOW CREATE DATABASE
Description
This statement checks the creation information of the doris built-in database or catalog database.
Syntax
SHOW CREATE DATABASE [<catalog>.]<db_name>;
Required parameters
** 1. <db_name>**
Database Name
Optional parameters
** 1. <catalog>**
Indicates whether the table is internal or external
Return Value
| Column | Description |
|---|---|
| Database | Database Name |
| Create Database | Corresponding database creation statement |
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 |
Example
-
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' |
+-----------+------------------------------------------------------------------------------------+