Skip to content

Commit ca70979

Browse files
authored
Merge pull request Snailclimb#1568 from lishuihao/patch-1
Update mysql-index.md
2 parents fb92ff1 + 666406f commit ca70979

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/database/mysql/mysql-index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ InnoDB 引擎中,其数据文件本身就是索引文件。相比 MyISAM,索
9494

9595
一张数据表有只能有一个主键,并且主键不能为 null,不能重复。
9696

97-
在 MySQL 的 InnoDB 的表中,当没有显示的指定表的主键时,InnoDB 会自动先检查表中是否有唯一索引的字段,如果有,则选择该字段为默认的主键,否则 InnoDB 将会自动创建一个 6Byte 的自增主键。
97+
在 MySQL 的 InnoDB 的表中,当没有显示的指定表的主键时,InnoDB 会自动先检查表中是否有唯一索引且不允许存在null值的字段,如果有,则选择该字段为默认的主键,否则 InnoDB 将会自动创建一个 6Byte 的自增主键。
9898

9999
### 二级索引(辅助索引)
100100

0 commit comments

Comments
 (0)