在 exec 里的 table 变量怎么操作?
exec ( '
Declare @Co int
declare @name table(id uniqueIdentifier)
Insert into @name select id from sysobjects
Select @Co=Count(1) From sysobjects
exec ( ' 'select top ' '+@Co+ ' ' * From ' '+@name+ ' ' ' ')
')
这句怎么改?
------解决方案--------------------exec ( '
Declare @Co int
declare @name table(id Int)
Insert into @name select id from sysobjects
Select @Co=Count(1) From sysobjects
set rowcount @Co
select * from @name
set rowcount 0 ')