Query to get all CREATE statements of MySql Tables

寵の児 提交于 2019-12-03 08:04:27

问题


I want All CREATE statements of MySql Tables in 1 query result.

For example, INFORMATION_SCHEMA contains all table names,comments etc. but where are the CREATE statements are stored in MySql ? can it be retrieved in one query for all tables ?

Currently i am retrieving TABLE ddl as below for 1 table. I have 100's of tables so i can repeat the same everytime which is time taking process

show create table row_format;

回答1:


mysqldump -h localhost -u root -p --no-data --compact  some_db


mysqldump -d --compact --compatible=mysql323 ${dbname}|egrep -v "(^SET|^/\*\!)"

How do I use mysqldump to export only the CREATE TABLE commands



来源:https://stackoverflow.com/questions/18050857/query-to-get-all-create-statements-of-mysql-tables

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!