...SET NOCOUNT ON
OPEN c_tbl
FETCH NEXT FROM c_tbl
INTO @TableName
WHILE (@@fetch_status = 0)
BEGIN
SET @SqlCommand = 'SELECT @TableName, count(*) FROM dbo.[' + @TableName + ']'
INSERT #Return (TableName, [RowCount])
EXEC sp_executesql @SqlCommand, N'@TableName nvarchar(60)', @TableName...