当我尝试在MySQL 5.5.24中创建此列时出现语法错误:
`count` mediumint unsigned not null default=0
怎么了?
答案 0 :(得分:3)
从=
删除default = 0
符号:
http://sqlfiddle.com/#!2/55533
CREATE TABLE Table1 (
`count` mediumint unsigned not null default 0
);
请参阅文档:http://dev.mysql.com/doc/refman/5.5/en/create-table.html
column_definition:
data_type [NOT NULL | NULL] [DEFAULT default_value]
...