这是在创建表的同时创建了组合索引,并且添加了索引长度100,然后提示
ERROR 1089 (HY000): Incorrect prefix key; the used key part isn't a string, the
used length is longer than the key part, or the storage engine doesn't support u
nique prefix keys。
然后我重新创建数据表,同时将索引长度100去掉,结果便可以了,如图:
MySQL中在创建表的时候创建组合索引,为什么我加了索引长度后就提示错误呢?
- 写回答
- 好问题 0 提建议
- 追加酬金
- 关注问题
- 邀请回答
-
3条回答
- -0000- 2016-01-19 12:37关注
你的age不是int的么 又不是字符串。。。
本回答被题主选为最佳回答 , 对您是否有帮助呢?解决 无用评论 打赏 举报