mysql命令行查看建表语句
命令如下:
SHOW CREATE TABLE tbl_name
例子:
mysql> SHOW CREATE TABLE t\G *************************** 1. row *************************** Table: t Create Table: CREATE TABLE `t` ( `id` int(11) NOT NULL AUTO_INCREMENT, `s` char(60) DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4
参考:https://dev.mysql.com/doc/refman/8.0/en/show-create-table.html