批量删除数据库指定前/后缀的表
declare @name varchar(20)
while(exists(select * from sysobjects where name like 'dnt_%'))
begin
select @name=name from sysobjects where name like 'dnt_%'
exec ('drop table '+@name)
end
while(exists(select * from sysobjects where name like 'dnt_%'))
begin
select @name=name from sysobjects where name like 'dnt_%'
exec ('drop table '+@name)
end