批量删除SQL数据库中的所有表【笔记】
use OTRJiraDB 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
宋兴柱(Sindrol):转载内容,请标明出处,谢谢!源文来自 宝贝云知识分享:https://www.dearcloud.cn