34,873
社区成员
发帖
与我相关
我的任务
分享
declare @name sysname
declare cur cursor for
select name from sysobjects where xtype='U' and name like '%s'
open cur
fetch next from cur into @name
while @@fetch_status=0
begin
exec ('drop table ['+@name+']')
fetch next from cur into @name
end
close cur
deallocate cur