SQLServer 2008 R2 删除字段前检查字段的约束:
select a.name,b.name as cname from syscolumns a left join sysobjects b on a.cdefault=b.id where a.id=object_id('TableName') and a.name='FieldName'
SQLServer 2008 R2 删除字段前检查字段的约束:
select a.name,b.name as cname from syscolumns a left join sysobjects b on a.cdefault=b.id where a.id=object_id('TableName') and a.name='FieldName'