declare @name varchar(200) while(exists(select * from sysobjects where name like ‘表名前缀%‘)) begin select @name=name from sysobjects where name like ‘表名前缀%‘ exec (‘drop table ‘+@name) end
时间: 2024-10-05 23:56:22
declare @name varchar(200) while(exists(select * from sysobjects where name like ‘表名前缀%‘)) begin select @name=name from sysobjects where name like ‘表名前缀%‘ exec (‘drop table ‘+@name) end