雖然在MySQL中更改表來添加一個新的列我得到致命錯誤..我看到了這個問題的相關答案,我找到了答案如下: -改變表給予致命的錯誤在Mysql
Make a new table with the same structure.
Add the column to the new table.
Insert the data from the old table into the new table.
Rename the old table to old.bak
Rename the new table to the old table.
If all went well, delete the old.bak.
但我原來的表中包含一些觸發器,索引等
我的問題是
「我可以寫我的知己腳本中的任何差異。方法來克服這一致命的錯誤」?
我擔心的是與MySQL有關的,但任何其他RDBMS相關答案也很好...
我正在使用alter table語法: - 「ALTER TABLE table_name添加column_name數據類型(大小)」 – DreamSea
您正在使用的新列添加的語法是什麼? – Zeina
什麼是你使用的DataType? – Zeina