MySQL ALTER TABLE add column: error at another column

后端 未结 2 731
南旧
南旧 2021-01-25 22:36

ok, i have people table and try run sql-script with the next command:

ALTER TABLE `people`
    ADD COLUMN `name_spelling`
    VARCHAR(255) NULL DEFA         


        
2条回答
  •  情深已故
    2021-01-25 23:11

    I ran into this issue once and the fix i had was to to edit mysql.cnf file Replace : sql_mode='STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION'

    with this : sql_mode='STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION'

    Notice i removed the No_ZEROs in that options.

提交回复
热议问题