Code
declare @name nvarchar(4000)
set rowcount 1
select @name = name from sysobjects where xtype = 'U' order by newid()
while @@rowcount <> 0
begin
set rowcount 0
set @name = 'drop table ' + ltrim(rtrim(@name))
exec(@name)
set rowcount 1
select @name = name from sysobjects where xtype = 'U' order by newid()
end
go
declare @name nvarchar(4000)
set rowcount 1
select @name = name from sysobjects where xtype = 'U' order by newid()
while @@rowcount <> 0
begin
set rowcount 0
set @name = 'drop table ' + ltrim(rtrim(@name))
exec(@name)
set rowcount 1
select @name = name from sysobjects where xtype = 'U' order by newid()
end
go