title: What is the difference between TEMPORARY TABLE and TABLE VARIABLE in SQL 2008?
body: <p>What is the difference between:</p>
  
  <pre><code>CREATE TABLE #temp ( [ID] INT)
  
  INSERT INTO #temp
  SELECT ...
  </code></pre>
  
  <p>and</p>
  
  <pre><code>DECLARE @temp TABLE ( [ID] INT)
  
  INSERT @temp
  SELECT ...
  </code></pre>
  
  <p>in SQL Server 2008?</p>