发布网友
共1个回答
热心网友
在创建外键的时候添加级联删除
foreign key (Id) references table1(Id) on delete cascade
这样delete from table Where Id = 1 就能级联删除子表数据