1
0
mirror of https://github.com/Snailclimb/JavaGuide synced 2025-06-25 02:27:10 +08:00

Merge pull request #1568 from lishuihao/patch-1

Update mysql-index.md
This commit is contained in:
Guide哥 2022-02-24 21:02:07 +08:00 committed by GitHub
commit ca70979f71
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -94,7 +94,7 @@ InnoDB 引擎中,其数据文件本身就是索引文件。相比 MyISAM
一张数据表有只能有一个主键,并且主键不能为 null不能重复。 一张数据表有只能有一个主键,并且主键不能为 null不能重复。
在 MySQL 的 InnoDB 的表中当没有显示的指定表的主键时InnoDB 会自动先检查表中是否有唯一索引的字段,如果有,则选择该字段为默认的主键,否则 InnoDB 将会自动创建一个 6Byte 的自增主键。 在 MySQL 的 InnoDB 的表中当没有显示的指定表的主键时InnoDB 会自动先检查表中是否有唯一索引且不允许存在null值的字段,如果有,则选择该字段为默认的主键,否则 InnoDB 将会自动创建一个 6Byte 的自增主键。
### 二级索引(辅助索引) ### 二级索引(辅助索引)