Inserting a Column to preexisting table in phpmyadmin

后端 未结 6 1871
春和景丽
春和景丽 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 19:12

    I think this video can help you. With PHPMyAdmin

    1. Go to the page of the table you want to modify
    2. At the bottom of the page, select you desired column in "After" (at which position you want to add your column in the table)
    3. Validate and enter new column information

    You can also do it via plain SQL, with a ALTER TABLE query:

    ALTER TABLE mytable ADD column3 INT AFTER column1
    

提交回复
热议问题