SHOW CREATE {DATABASE | SCHEMA} db_name
Shows the CREATE DATABASE
statement that creates the given database. SHOW CREATE SCHEMA
is a synonym for SHOW CREATE DATABASE
. SHOW CREATE DATABASE
quotes database names according to the value of the sql_quote_show_create
server system variable.
SHOW CREATE DATABASE test; +----------+-----------------------------------------------------------------+ | Database | Create Database | +----------+-----------------------------------------------------------------+ | test | CREATE DATABASE `test` /*!40100 DEFAULT CHARACTER SET latin1 */ | +----------+-----------------------------------------------------------------+ SHOW CREATE SCHEMA test; +----------+-----------------------------------------------------------------+ | Database | Create Database | +----------+-----------------------------------------------------------------+ | test | CREATE DATABASE `test` /*!40100 DEFAULT CHARACTER SET latin1 */ | +----------+-----------------------------------------------------------------+
With sql_quote_show_create
off:
SHOW CREATE DATABASE test; +----------+---------------------------------------------------------------+ | Database | Create Database | +----------+---------------------------------------------------------------+ | test | CREATE DATABASE test /*!40100 DEFAULT CHARACTER SET latin1 */ | +----------+---------------------------------------------------------------+
© 2019 MariaDB
Licensed under the Creative Commons Attribution 3.0 Unported License and the GNU Free Documentation License.
https://mariadb.com/kb/en/show-create-database/