title: PHP like $$var in T-SQL (SQL Server 2008)
body: <p>Is there any way to execute something like php <code>$$var</code> ..?</p>
  
  <p>Which will make the value of a var as var name.</p>
  
  <p>I have been googling for many hours ant cant find any that satisfy my needs.</p>
  
  <p>Thanks.</p>
  
  <p>edit:</p>
  
  <p>currently what I want to achieve is something similar to this</p>
  
  <pre><code>declare @table1 table(Name Varchar(100))
  declare @table2 table(Name Varchar(100))
  ...
  declare @table10 table(Name Varchar(100))
  
  declare @int1 int
  set @int1 = 0
  while @int1 &lt; 10
  begin
  select @[table + @int1]
  END
  </code></pre>