【发布时间】:2013-06-17 04:52:36
【问题描述】:
考虑下表:
create table t (
n1 int, n2 int, index (n1, n2),
u1 int, u2 int, unique index (u1, u2));
根据SHOW COLUMNS documentation,我期待Key = UNI for u1 因为
如果 Key 是 UNI,则该列是 UNIQUE 索引的第一列。 (一个 UNIQUE 索引允许多个 NULL 值,但您可以通过检查 Null 字段来判断该列是否允许 NULL。)
我错过了什么?
.
desc t; 的输出(不包括 Default 和 Extra 列)
.
show index from t; 的输出(没有一些不相关的列)
【问题讨论】:
标签: mysql