title: Declare a Table Variable Based on Select Statement
body: <p>I want to declare a table variable and fill it with a select, without having to explicitly define its columns.  Does T-SQL allow something like this:</p>
  
  <pre><code>DECLARE @people TABLE() SELECT * FROM Persons;
  </code></pre>
  
  <p>Hypothetically, the above statement would match column types identically, and fill the @people table variable at the same time. :)</p>