set @SQL=N' select @minTableId = MIN(id) from ' + @AcDB + '.dbo.vTblOfRollNo '
Declare Cursor For
EXEC SP_EXECUTESQL @SQL
if i have declared all the variables in above query but Declaration of cursor in above query shows ERROR. What is Solution?