title: Scope of #TempTables limited to an EXEC statement?
body: <p>By trying this </p>
  
  <pre><code>use master
  go
  
  select * into #TempTable from sys.all_views 
  select * from #TempTable
  drop table #TempTable
  
  exec('
  select * into #TempTable2 from sys.all_views 
  ')
  /* This will give error: */
  select * from #TempTable2
  </code></pre>
  
  <p>I realized that #TempTable2 is not accessible... so using the <code>select into #TempTable</code> syntax is used inside an EXEC statement means the table is auto destroyed as the exec statement is completed?</p>