删除数据库语句

GO
declare @sql varchar(8000)
while (select count(*) from sysobjects where type='U')>0
begin
SELECT @sql='drop table ' + name
FROM sysobjects
WHERE (type = 'U')
ORDER BY 'drop table ' + name
exec(@sql)
end

posted @ 2020-06-22 15:28  阳光下丶  阅读(178)  评论(0编辑  收藏  举报