cascade方式
在父表上update/delete记录时,同步update/delete掉子表的匹配记录 web
set null方式
在父表上update/delete记录时,将子表上匹配记录的列设为null
要注意子表的外键列不能为not null svg
No action方式
若是子表中有匹配的记录,则不容许对父表对应候选键进行update/delete操做 xml
Restrict方式
同no action, 都是当即检查外键约束blog
Set default方式
父表有变动时,子表将外键列设置成一个默认的值 但Innodb不能识别图片