innodb外键限制

191 篇文章 87 订阅 ¥9.90 ¥99.00
InnoDB外键约束允许参照主键、索引或非唯一索引,但不支持用户定义分区表中的外键。此外,InnoDB还扩展了标准SQL,允许外键约束引用非唯一键。
摘要由CSDN通过智能技术生成

定义上:

innodb permits a foreign key to reference any index column or group of columns. However, in the referenced table, there must be an index where the referenced columns are listed as the first columns in the same order.
允许参照一个索引列或者一组列,一组列的第一个必须是索引。


InnoDB does not currently support foreign keys for tables with user-defined partitioning. This means that no user-partitioned InnoDB table may contain foreign key references or columns referenced by foreign keys.
innodb不支持用户定义的分区表,即分区的innodb表中不能有外键或者被其他键参照。


InnoDB allows a foreign key constraint to reference a non-unique key. This is an InnoDB extension to standard SQL.
innodb允许参照一个非唯一索引。


总的来说innodb的外键参照可以是主键、索引、非唯一索引<

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

yzs87

你的鼓励是我最大的动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值