使用外键让两张表级联删除更新

alter table dbo.TheVote add constraint fk_TheVote_VoteItems
foreign key (VoteItemsId)
references dbo.VoteItems([Id]) on update cascade on delete cascade

原文地址:https://www.cnblogs.com/xiangzhong/p/3373548.html