go
declare @tbname varchar(250)
declare #tb cursor for select name from sysobjects where objectproperty(id,'IsUserTable')=1
open #tb
fetch next from #tb into @tbname
while @@fetch_status=0
begin
  exec('drop table ['+@tbname+']')
  fetch next from #tb into @tbname
end
close #tb
deallocate #tb

相关文章:

  • 2021-08-08
  • 2021-08-23
  • 2022-12-23
  • 2021-11-07
  • 2021-06-28
  • 2021-12-09
  • 2021-11-14
猜你喜欢
  • 2022-12-23
  • 2021-11-14
  • 2021-09-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案