MSSQL删除所有用户表
作者:小编
更新时间:2023-08-09
点击数:
USE [XQGL]
declare @table varchar(600)
while (select count(*) from sysobjects where type='u')>=1
begin
set @table=(select top 1 name from sysobjects where type='u')
set @table='drop table '+@table
exec(@table)
end