我試圖更改表併爲可空列設置默認值。但我得到以下錯誤。無法將默認值設置爲INT(11)更改表
下面是一個命令:
ALTER TABLE `questiontboard`.`questions`
CHANGE COLUMN `status` `status` (11) NULL DEFAULT 1 ;
以下是錯誤:
ERROR 1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '(11) NULL DEFAULT 1' at line 2
SQL Statement:
ALTER TABLE `questionboard`.`questions`
CHANGE COLUMN `status` `status` (11) NULL DEFAULT 1
ERROR: Error when running failback script. Details follow.
ERROR 1050: Table 'question' already exists
我到底做錯了什麼?
這是尷尬。 Mysql Workbech auto在INT(11)列上生成此命令。謝謝。 – 2014-10-10 08:58:21