declare @tab varchar(20)
while exists(select * from sysobjects where xtype='u')
begin
select top 1 @tab=name from sysobjects where xtype='u'
exec('drop table '+@tab)
end
删除当前数据库中的所有表
while exists(select * from sysobjects where xtype='u')
begin
select top 1 @tab=name from sysobjects where xtype='u'
exec('drop table '+@tab)
end
删除当前数据库中的所有表
814

被折叠的 条评论
为什么被折叠?



