Drop Every Default Constraint - SQL Server

When executed against the database of interest, the following T-SQL code will generate a set of SQL statements which, when executed against the same database, will drop every DEFAULT constraint in the database.

select
    sql = 'alter table [dbo].[' + p.name + '] drop constraint [' + o.name + ']'
from
    sys.objects o
    inner join sys.objects p
        on o.parent_object_id = p.object_id
where 1=1
    and o.type = 'D'