How to generate DDL for all tables in a database in MySQL

后端 未结 3 1550
野性不改
野性不改 2021-01-30 20:54

How to generate the DDL for all tables in a database of MySQL at once. I know that the following query will output the DDL for a table. But I want DDL of all tables at once beca

3条回答
  •  小鲜肉
    小鲜肉 (楼主)
    2021-01-30 21:19

    You can do it using the mysqldump command line utility:

    mysqldump -d -u  -p -h  
    

    The -d option means "without data".

提交回复
热议问题