日期:2014-05-17 浏览次数:20633 次
select name from tempdb.dbo.sysobjects where type='u' and name like '#%'
drop table #a;drop table #b;drop table #c
declare @sql varchar(3000)
select @sql=isnull(@sql+';','')+'drop table'+name+''
select name from tempdb.dbo.sysobjects where type='u' and name like '#%'
print @sql
--exec(@sql)
declare @sql varchar(3000)
select @sql=isnull(@sql+';','')+'drop table'+name+''
from tempdb.dbo.sysobjects where type='u' and name like '#%'
print @sql
--exec(@sql)