title: Creating a database dump for specific tables and entries Postgres
body: <p>I have a database with hundreds of tables, what I need to do is export specified tables and insert statements for the data to one sql file.</p>
  
  <p>The only statement I know can achieve this is</p>
  
  <pre><code>pg_dump -D -a -t zones_seq interway &gt; /tmp/zones_seq.sql
  </code></pre>
  
  <p>Should I run this statement for each and every table or is there a way to run a similar statement to export all selected tables into one big sql big. The pg_dump above does not export the table schema only inserts, I need both</p>
  
  <p>Any help will be appreciated.</p>