title: Why is table variable not working for SELECT INTO in SQL Server
body: <pre><code>DECLARE @TEMP_TBL TABLE (COL1 INT, COL2 VARCHAR(100)
  SELECT ID, NAME INTO @TEMP_TBL  FROM TB1
  </code></pre>
  
  <p>above code is not woking where as below code is working. Why?</p>
  
  <pre><code>SELECT ID, NAME INTO TB2 FROM TB1
  </code></pre>