34,838
社区成员




set @sql = 'Select * into ##tmp From ' + @TABLENAME + ' Where id='+ @i;
exec(@sql)
select * from ##tmp
select name into #tem from dbo.sysobjects where type='u'
select * from #tem
set @sql = 'Select * into #tmp From ' + @TABLENAME + ' Where id='+ @i;
exec(@sql + 'select * from #tmp')