use 数据库名(是要删除表的所在的那个数据库的名称)GOdeclare @sql varchar(8000)while (select count(*) from sysobjects where type='U')>0beginSELECT @sql='drop table ' + nameFROM sysobjectsWHERE (type = 'U')ORDER BY 'drop table ' + nameexec(@sql) end-----------------------------------------------use 数据库一定要填对哦......