我在网上搜了很多东西。我能理解的是,在我之前,这件事已经被许多人所面对,而且它也被归档为mysql错误。但我找不到任何解决办法。问题是我不能让这个命令起作用-
alter table areas order by area_name;我收到警告-
ORDER BY ignored as there is a user-defined clustered index in the table 'areas'我只想根据'area_name‘对表进行排序,也就是区域的名称。补充一句,我正试图在我的laravel app数据库中执行此操作。
发布于 2014-03-20 07:58:09
如果db引擎是InnoDB,则不能这样做。
http://dev.mysql.com/doc/refman/5.7/en/alter-table.html
orders对InnoDB表没有意义,因为InnoDB总是根据聚集索引对表行进行排序。
https://stackoverflow.com/questions/22526687
复制相似问题