declare @cur varchar(50)
declare curname cursor
for
select name from test.dbo.sysobjects where name like 'web_supply_%' or name like'sj_%'
open curname
fetch next from curname into @cur
while @@fetch_status=0
begin
declare @strSql varchar(500)
set @strSql='drop table '+ @cur
exec( @strSql)
fetch next from curname into @cur
end
close curname
deallocate curname
游历数据库内所有名字符合条件的表
最新推荐文章于 2025-05-11 16:16:12 发布