oracle、DB2、Informix常用约束语句

前端之家收集整理的这篇文章主要介绍了oracle、DB2、Informix常用约束语句前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
alter table student disable constraint fk_student; --oracle

ALTER TABLE student ALTER FOREIGN KEY fk_student NOT ENFORCED; --DB2

ALTER TABLE student ADD CONSTRAINT FOREIGN KEY (college_id) REFERENCES college CONSTRAINT student_fk1; --增加外键

ALTER TABLE student DROP CONSTRAINT fk_student;--删除外键

alter table student add constraint fk_student foreign key(college_id) references college(college_id);



alter table student2 add constraint fk_student foreign key(college_id) references college(college_id);--oracle alter table student2 add constraint fk_student foreign key(college_id) references college(college_id);--db2 ALTER TABLE student ADD CONSTRAINT FOREIGN KEY (college_id) REFERENCES college CONSTRAINT student_fk1; --informix

原文链接:https://www.f2er.com/oracle/207518.html

猜你在找的Oracle相关文章