Inserting a Column to preexisting table in phpmyadmin

后端 未结 6 1866
春和景丽
春和景丽 2021-01-07 18:44

I want to add a column to preexisting table. Can I add it in between two existing columns? I am working on phpmyadmin.

6条回答
  •  误落风尘
    2021-01-07 18:54

    The ordering of columns in MySQL isn't of much importance. As for adding a new column,

    ALTER TABLE `tblName`
        ADD COLUMN `colName` INT(10) AFTER `firstCol`;
    

    The AFTER clause defines the position where your new column will come.

提交回复
热议问题