PHP myAdmin - Change Field Order (Move Up Or Down)

后端 未结 9 1003
伪装坚强ぢ
伪装坚强ぢ 2020-12-23 16:23

How do I change the order of my table fields without deleting the field and re-inserting it, using PHP myAdmin?

相关标签:
9条回答
  • 2020-12-23 16:47
    alter table table_name modify column col_name type after col_name
    
    0 讨论(0)
  • 2020-12-23 16:48

    Another alternative:

    CREATE new_table SELECT columns-in-new-order FROM old_table;
    
    0 讨论(0)
  • 2020-12-23 16:49

    Since version 4.0, phpMyAdmin has a "Move columns" dialog in Structure, that permits you to graphically move columns in the structure.

    0 讨论(0)
  • 2020-12-23 16:50

    if you have MySQL Workbench you can easily reorder columns using mouse, graphically.

    Just connect to your database, select your table and after right click, alter table and then drag columns to reorder them.

    0 讨论(0)
  • 2020-12-23 16:53

    If you have phpMyAdmin 4.0.0+, you can use the phpMyAdmin Feature under Structure:

    0 讨论(0)
  • 2020-12-23 16:53

    It's simple. Just go to PHPmyadmin, click on your database, then click table. Then click on structure. Below the table look for the button, "Move columns". Click and order the columns the way you want.

    0 讨论(0)
提交回复
热议问题