MySQL arrange existing table columns

前端 未结 6 568
鱼传尺愫
鱼传尺愫 2021-01-30 03:35

How can I change the position of a certain existing column in MySQL table?

Ex: I want to move the column username from its current position to

6条回答
  •  灰色年华
    2021-01-30 04:31

    Simple use this Query

    alter table `admin` modify id int(11) first;
    

    or

    alter table `admin` modify id int(11) after `some_column`;
    

提交回复
热议问题