declare @tname varchar(8000)
set @tname=''select @tname=@tname + Name + ',' from sysobjects where xtype='U'
if(@tname!='')
select @tname='drop table ' + left(@tname,len(@tname)-1)exec(@tname)
--use 数据库名(这个写在最前台的)