增加外键
alter table T1 drop constraint fk_1
alter table T1 add constraint fk_2 foreign key(a1) references T2(a2)
- --DataTable 原数据表
- --DataTable_20150717 要备份的新表名
- select * into DataTable_20150717
- from DataTable Where [条件1,条件2];
增加外键
alter table T1 drop constraint fk_1
alter table T1 add constraint fk_2 foreign key(a1) references T2(a2)