Rapid-fire clear down scripts…

Rapid-fire clear down scripts for Sql server 2005

select ‘drop table ‘ + SS.Name + ‘.’ + SO.name
from sysobjects SO
join sys.schemas SS ON SO.uid = SS.[schema_id]
where type = ‘U’
order by SO.name

select ‘drop function ‘ + SS.Name + ‘.’ + SO.name
from sysobjects SO
join sys.schemas SS ON SO.uid = SS.[schema_id]
where type = ‘FN’
order by SO.name

select ‘drop procedure ‘ + SS.Name + ‘.’ + SO.name
from sysobjects SO
join sys.schemas SS ON SO.uid = SS.[schema_id]
where type = ‘P’ and SS.Name != ‘dbo’
order by SO.name

select ‘drop view ‘ + SS.Name + ‘.’ + SO.name
from sysobjects SO
join sys.schemas SS ON SO.uid = SS.[schema_id]
where type = ‘V’
order by SO.name