declare @name varchar(50)
select @name =b.name from sysobjects b join syscolumns a
on b.id = a.cdefault
where a.id = object_id('table_name')
and a.name ='column_name'
select @name
if(@name)
exec('alter table table_name drop constraint ' + @name)
declare @name varchar(50)
select @name =b.name from sysobjects b join syscolumns a
on b.id = a.cdefault
where a.id = object_id('table_name')
and a.name ='column_name'
select @name
if(@name)
exec('alter table table_name drop constraint ' + @name)