HomeMogDBMogDB StackUqbar
v5.0

Documentation:v5.0

Supported Versions:

Other Versions:

SHOW CREATE DATABASE

Function

Displays the CREATE DATABASE statement that creates the named database.

If that 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

Database and schema are equivalent in b-database, so when statements are assembled in MogDB, they are assembled according to create schema.

In MogDB, the create schema supports the with blockchain clause, so the information in the system table of the schema will also be used to determine whether to splice the clause when assembling.

Syntax

SHOW CREATE {DATABASE | SCHEMA} [IF NOT EXISTS] db_name

Parameter Description

  • db_name

    The target instance name.

Examples

-- Query Database Creation Statements
MogDB=# show create database test_get_database;
     Database      |                  Create Database                   
-------------------+----------------------------------------------------
 test_get_database | CREATE SCHEMA test_get_database AUTHORIZATION omm 
(1 row)
Copyright © 2011-2024 www.enmotech.com All rights reserved.