Generate CREATE statements for all MySql Tables

后端 未结 2 533
甜味超标
甜味超标 2021-02-02 13:22

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

For example, INFORMATION_SCHEMA contains all table names,comments

相关标签:
2条回答
  • 2021-02-02 13:46

    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

    0 讨论(0)
  • 2021-02-02 13:59

    Someone just showed me an easier way.

    1. Highlight all the tables
    2. Right click.
    3. Select 'Copy to Clipboard' and then 'Create statements'.
    4. Go to a text editor and paste and everything is there.
    0 讨论(0)
提交回复
热议问题