title: How to define a variable instead of table name in sql?
body: <p>I have this SQL query:</p>
  
  <pre><code>delete from Main.dbo.ACTIVITY;
  insert into Main.dbo.ACTIVITY
  select * from MainTemp.dbo.ACTIVITY;
  </code></pre>
  
  <p>and I want to execute that SQL for 10 tables after executing for <code>ACTIVITY</code>.</p>
  
  <p>Is there any way to do that? Defining a variable or something?</p>
  
  <p>I'm running the query in SQL Server Management Studio 10 (= SQL Server 2008)</p>