我试图更改表并为可空列设置默认值。但我得到以下错误。无法将默认值设置为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