Home  >  Article  >  Database  >  How can I view the statements that created a specific MySQL database?

How can I view the statements that created a specific MySQL database?

王林
王林forward
2023-09-03 22:33:04859browse

How can I view the statements that created a specific MySQL database?

With the CREATE DATABASE db-name command, we can view the statements that create any MySQL database.

mysql> SHOW CREATE DATABASE Sample;
+----------+-------------------------------------------------------------------+
| Database | Create Database                                                   |
+----------+-------------------------------------------------------------------+
| sample   | CREATE DATABASE `sample` /*!40100 DEFAULT CHARACTER SET latin1 */ |
+----------+-------------------------------------------------------------------+
1 row in set (0.00 sec)

The output shows how to create a MySQL database named Sample.

The above is the detailed content of How can I view the statements that created a specific MySQL database?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:tutorialspoint.com. If there is any infringement, please contact admin@php.cn delete