gpt4 book ai didi

mysql-workbench - Mysql workbench 外键选项【Restrict, Cascade, Set Null, No Action】,有什么作用?

转载 作者:行者123 更新时间:2023-12-03 11:05:12 30 4
gpt4 key购买 nike

在更新和删除的外键选项中。
每个字段 [Restrict, Cascade, Set Null, No Action] 有什么作用?

最佳答案

如果你一一拿:

对于更新和删除:

如果您尝试更新/删除父行:

Restrict : Nothing gonna be delete if there is a child row

Cascade : the child row will be delete / update too

Set Null : the child column will be set to null if you delete the parent

No action : The child row will not be concern of the delete / update

关于mysql-workbench - Mysql workbench 外键选项【Restrict, Cascade, Set Null, No Action】,有什么作用?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16163301/

30 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com