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

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-10-16
  • 2021-08-18
  • 2022-12-23
  • 2021-12-12
  • 2021-11-30
猜你喜欢
  • 2021-09-25
  • 2021-10-12
  • 2022-03-06
  • 2021-12-10
  • 2022-01-13
  • 2021-08-29
  • 2022-01-09
相关资源
相似解决方案