title: Passing Table Name as parameter in SQL Server 2012
body: <p>I created a SQL Server procedure where I am passing table names as parameters. </p>
  
  <pre><code>@Input_Table_Name nvarchar(200),
  @Output_Table_Name nvarchar(200)
  </code></pre>
  
  <p>This is working fine when I use <code>select * from @Input_Table_Name</code>, however it's not working when I use <code>select * into @Output_Table_Name</code> or <code>Update @Output_Table_Name</code> or <code>Alter table @Output_Table_Name</code>.</p>
  
  <p>I understand creating a dynamic query instead of passing table name as parameter is a good practice, however in this case, I just want to work with passing table name as parameter. </p>
  
  <p>Please let me know how we can make this work with <code>Select * into</code>, <code>Alter Table</code>, or <code>Update</code> SQL statements. </p>