Nan's Blog
Thursday, August 23, 2018
SQL - drop all temp tables
declare @sql nvarchar(max)
select @sql = isnull(@sql+';', '') + 'drop table ' + quotename(name)
from tempdb..sysobjects
where name like '#[^#]%'
exec (@sql)
Newer Posts
Older Posts
Home
Subscribe to:
Posts (Atom)