我想查看表的索引
SHOW INDEXES FROM images
这就是我得到的
**Key_name** **Column_name**
user_id user_id
user_id tags
user_id confirm
insert_date_time insert_date_time
insert_date_time category
insert_date_time confirm
我很困惑,为什么 key_name 下有这么多 user_id 和 insert_date_time ? 我很确定它们不重复。
为什么不同的键名下有2个confirm
索引?
我只需单击“index”即可在 phpmyadmin 中添加索引。
最佳答案
您可以随意命名 key 。在本例中,您有三个名为 user_id
的键和三个名为 insert_date_time
的键,其中两个实际上位于其他列上。另外,您似乎有重复的 key 需要确认。
关于mysql 索引 : multiple Key_name with the same name,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20553776/