I have searched over net a lot. What I could understand is that this thing has been faced by many people before me and it has also been filed as mysql bugs. But I couldn't find any solution to this. The problem is just that I can't get this command working-
alter table areas order by area_name;
I get this warning-
ORDER BY ignored as there is a user-defined clustered index in the table 'areas'
I just want to sort the table on the basis of 'area_name', that is, names of areas. Just to add, I am trying to do this in the database of my laravel app.
If the db engine is InnoDB, then you can't do this.
From the doc:
ORDER BY does not make sense for InnoDB tables because InnoDB always orders table rows according to the clustered index.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With