title: How to copy data and schema of all tables into a different database on the same server?
body: <p><strong>Using a script</strong> <em>(however without using data import/export, without using backup restore, without using database copy)</em> <strong>how can I copy complete tables (schema and data) from one database on the same server to another database on the same server?</strong></p>
  
  <p>I've already tried to do what I've italicized above; however, due to user permissions etc, I was unable to use those methods.</p>
  
  <p>Perhaps this will work:</p>
  
  <pre><code> SELECT *
   INTO newdb.dbo.newtable
   FROM olddb.dbo.oldtable
  </code></pre>
  
  <p>But I would like to apply this to every table (around 100 tables).</p>