declare @name varchar(30)
while(exists(select * from sysobjects where name like 'PM%'))
begin
select @name=name from sysobjects where name like 'PM%'
exec ('drop table '+@name)
end
SQLSERVER批量删除表
最新推荐文章于 2023-10-24 15:41:11 发布
declare @name varchar(30)
while(exists(select * from sysobjects where name like 'PM%'))
begin
select @name=name from sysobjects where name like 'PM%'
exec ('drop table '+@name)
end