MySQL arrange existing table columns

前端 未结 6 526
鱼传尺愫
鱼传尺愫 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:29

    Thanks guys for all of your response, I'm already done with it.

    ALTER TABLE tbl_user MODIFY gender char(1) AFTER username;
    

    Well it's just like organizing your table right? you don't want your primary key field to be on the last order of your table, at least I know how to coonfigure it if ever I encounter that problem, I'm trying to get used in text based database and not using gui for now.

    Thanks again guys :)

提交回复
热议问题