Name

SHOW CREATE DATABASE

Synopsis

SHOW CREATE DATABASE database

Use this statement to display an SQL statement that can be used to create a database like the one given. This statement is mostly useful for determining the default character set. It’s available as of Version 4.1 of MySQL.

SHOW CREATE DATABASE richard_stringer\G
*************************** 1. row ***************************
Database: richard_stringer
Create Database: CREATE DATABASE `richard_stringer`
                 /*!40100 DEFAULT CHARACTER SET latin2 */

Get MySQL in a Nutshell now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.