title: SQL Server Management Studio 2012 - Export all tables of database as csv
body: <p>I have a database in SQL Server with a lot of tables and wish to export all tables in csv format. From a very similar question asked previously - <a href="https://stackoverflow.com/questions/17471994/export-from-sql-server-2012-to-csv-through-management-studio">Export from SQL Server 2012 to .CSV through Management Studio</a></p>
  
  <blockquote>
    <p>Right click on your database in management studio and choose Tasks ->
    Export Data...</p>
    
    <p>Follow a wizard, and in destination part choose 'Flat File
    Destination'. Type your file name and choose your options.</p>
  </blockquote>
  
  <p>What I want is the capability to export all tables at once. The SQL Server Import and Export Wizard only permits one table at a time. This is pretty cumbersome, if you have a very big database. I think a simpler solution might involve writing a query, but not sure.</p>