How to add new column to MYSQL table?

后端 未结 8 1727
南旧
南旧 2020-11-27 12:38

I am trying to add a new column to my MYSQL table using PHP. I am unsure how to alter my table so that the new column is created. In my assessment table I have:



        
8条回答
  •  春和景丽
    2020-11-27 13:18

    • You can add a new column at the end of your table

      ALTER TABLE assessment ADD q6 VARCHAR( 255 )

    • Add column to the begining of table

      ALTER TABLE assessment ADD q6 VARCHAR( 255 ) FIRST

    • Add column next to a specified column

      ALTER TABLE assessment ADD q6 VARCHAR( 255 ) after q5

    and more options here

提交回复
热议问题