Sql Server批量删除指定表
--批量删除以test的表开头的表 declare @name varchar(50) while(exists(select * from sysobjects where name like test%' )) begin select @name=name from sysobjects where name like test%' exec ('drop table '+@name) end
--批量删除以test的表开头的表 declare @name varchar(50) while(exists(select * from sysobjects where name like test%' )) begin select @name=name from sysobjects where name like test%' exec ('drop table '+@name) end