有谁能告诉我为什么PHPMyAdmin会抛出错误#1064?
MySQL查询:
CREATE TABLE posts
( ID not null auto_increment unsigned int,
pType enum('article', 'link') not null,
Title text null,
Link text null,
BodyMD longtext null,
BodyHT longtext not null,
URL tinytext not null,
ShortURL tinytext not null,
status enum('drafted', 'published') not null,
DateEdited timestamp null,
DatePublished timestamp null,
Topic enum('') null,
primary key (ID, URL, ShortURL)
);
答案 0 :(得分:2)
您需要在约束和属性之前指定列类型,正确的类型为int unsigned
,而不是unsigned int
:
...
ID int unsigned not null auto_increment,
...