SHOW CREATE DATABASE
Function
Displays the named database created by CREATE DATABASE.
If the SHOW statement contains an IF NOT EXISTS clause, the output also contains such a clause. SHOW CREATE SCHEMA is a synonym for SHOW CREATE DATABASE.
Precautions
In B-compatible database, the database is equivalent to the schema. Therefore, statements are assembled based on the create schema in the openGauss.
In openGauss, the WITH BLOCKCHAIN clause is supported when a schema is created. Therefore, the system determines whether to concatenate the clause based on the schema information in the system catalog.
Syntax
SHOW CREATE {DATABASE | SCHEMA} [IF NOT EXISTS] db_name
Parameter Description
db_name
Name of the target instance.
Examples
--Query the database creation statement.
openGauss=# show create database test_get_database;
Database | Create Database
-------------------+----------------------------------------------------
test_get_database | CREATE SCHEMA test_get_database AUTHORIZATION omm
(1 row)
Feedback