RROR 1221 (HY000): Incorrect usage of spatial/fulltext/hash index and explicit index orde
生活随笔
收集整理的这篇文章主要介绍了
RROR 1221 (HY000): Incorrect usage of spatial/fulltext/hash index and explicit index orde
小编觉得挺不错的,现在分享给大家,帮大家做个参考.
错误判断:
RROR 1221 (HY000): Incorrect usage of spatial/fulltext/hash index and explicit index orde类似这样的错误是因为给索引提供了错误的附加条件,
son表如下:
mysql> desc son; +-----------+-------------+------+-----+---------+-------+ | Field | Type | Null | Key | Default | Extra | +-----------+-------------+------+-----+---------+-------+ | id | int | YES | MUL | NULL | | | name | char(20) | YES | | NULL | | | grade | tinyint | YES | | NULL | | | favourate | varchar(39) | YES | | NULL | | +-----------+-------------+------+-----+---------+-------+ 4 rows in set (0.00 sec)给son表增加一个fulltext索引,code如下:
mysql> create fulltext index son_index on son(name(10) asc); ERROR 1221 (HY000): Incorrect usage of spatial/fulltext/hash index and explicit index order
结果引发错误,varchar类型不能指定asc
总结
以上是生活随笔为你收集整理的 RROR 1221 (HY000): Incorrect usage of spatial/fulltext/hash index and explicit index orde 的全部内容,希望文章能够帮你解决所遇到的问题。
- 上一篇: C++之vector容器初学(二)——插
- 下一篇: vector插入/删除元素