关闭触发器和约束是能关闭的 -------------------- ALTER TABLE trig_example DISABLE TRIGGER trig1--关闭触发器 ALTER TABLE cnst_example NOCHECK CONSTRAINT salary_cap --关闭约束
//ALTER TABLE cnst_example NOCHECK CONSTRAINT salary_cap --关闭约束 只适用于Check约束。关闭默认值 ALTER TABLE YourTable Drop Constraint DF_YourTable_YourColumn (DF: Default 通常系统生成该约束名) 启用默认值(重设) ALTER TABLE YourTable Add Constraint DF_YourTable_YourColumn Default YourDefaultValue For YourColumn 关闭索引 Alter Index YourIndex On YourTable Disable 启用索引 Alter Index YourIndex On YourTable Rebuild 以上带Your的是需要根据你的实际数据库情况填写的 如: YourTable指你的表名
--------------------
ALTER TABLE trig_example DISABLE TRIGGER trig1--关闭触发器
ALTER TABLE cnst_example NOCHECK CONSTRAINT salary_cap --关闭约束
只适用于Check约束。关闭默认值
ALTER TABLE YourTable Drop Constraint DF_YourTable_YourColumn
(DF: Default 通常系统生成该约束名)
启用默认值(重设)
ALTER TABLE YourTable Add Constraint DF_YourTable_YourColumn Default YourDefaultValue For YourColumn 关闭索引
Alter Index YourIndex On YourTable Disable
启用索引
Alter Index YourIndex On YourTable Rebuild 以上带Your的是需要根据你的实际数据库情况填写的
如: YourTable指你的表名