How do I change the order of my table fields without deleting the field and re-inserting it, using PHP myAdmin?
phpMyAdmin has finally included this feature in the most recent version (4.0 and up). Go to the "Structure" view for a table, click the Change button on the appropriate field, then under "Move column" select where you would like the field to go. Yay.
In phpMyAdmin go to table structure. On bottom you can press option "Move columns" There you can rearange tables as you see fit. That one is for rearranging columns, not the tables themselves.
An "ALTER TABLE ORDER BY" statement exist in the syntaxes accepted by MySQL. According to the documentation, this syntax: - only accept *one* column, as in "ALTER TABLE t ORDER BY col;" - is used to reorder physically the rows in a table, for optimizations.
Go to Structure and click Move Columns and then just drag the columns to rearrange.
ALTER TABLE `table_name` MODIFY `column_you_want_to_move` DATATYPE AFTER `column`
DATATYPE is something like DATETIME or VARCHAR(20) ..etc
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