You can move a column in a MySQL table to another position like this:
ALTER TABLE name_of_the_table MODIFY column_to_move tinyint(1) DEFAULT '0' AFTER column_to_move_after
Note: the part with: “tinyint(1) default ‘0′” is necessary and it should be the exact definition of your column.
For example yours might be:
int(10) unsigned NOT NULL auto_increment
or
int(10) unsigned NULL default ‘0′
or
…
No comments:
Post a Comment