-- 生成删除约束语句
select 'ALTER TABLE [' + b.name + '] drop CONSTRAINT ' + a.name +';' as 删除约束
from sysobjects a ,sysobjects b
where a.xtype ='f' and a.parent_obj = b.id and a.name like '%ON_CR_TRIANGLE_TYPE_ID'
select 'ALTER TABLE [' + b.name + '] drop CONSTRAINT ' + a.name +';' as 删除约束
from sysobjects a ,sysobjects b
where a.xtype ='f' and a.parent_obj = b.id and a.name like '%ON_CR_TRIANGLE_TYPE_ID'