title: How to generate DDL for all tables in a database in MySQL
body: <p>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 because I am having hundreds of tables in my database.</p>
  
  <pre><code>show create table &lt;database name&gt;.&lt;table name&gt;;
  </code></pre>
  
  <p>For example:</p>
  
  <pre><code>show create table projectdb.customer_details; 
  </code></pre>
  
  <p>The above query will result in DDL of <code>customer_details</code> table. </p>
  
  <p>I am using MySQL with MySQL workbench on Windows OS. </p>