Home Forums Article Discussions Article Discussions by Author Discuss content posted by Sudhir Chawla Dynamic SQL RE: Dynamic SQL
preeti.singh
SSC Journeyman
Points: 80
More actions
April 6, 2010 at 6:21 am
#1146421
we can also do it like.........
declare @sql varchar(100)
Set @sql = 'declare @cnt as int; Select @cnt=count(*) from ' + @tablevariable +'; SELECT @cnt'
Exec (@sql)
I think it was old question .bt i also want to contribute my ans.:-)