Here Mudassar Ahmed Khan has explained with an example, how to pass Table name as Parameter (Variable) to sp_executesql command in SQL Server.
The sp_executesql command supports accepting Table name as Parameter (Variable) in the following SQL Server versions i.e. 2000, 2005, 2008, 2008R2, 2012, 2014 or higher.
↧