–注意要注意删除和更新时要用主键约束的表进行删除和更新,个人建议
alter table Students add constraint FK_delete foreign key (Dno) references Depts (Dno) on delete CASCADE;
alter table Students add constraint FK_update foreign key (Dno) references Depts (Dno) on update CASCADE;
SQL语句的级联删除和级联更新
最新推荐文章于 2020-09-10 09:51:02 发布