0

谁能告诉我为什么 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) 
  );
4

1 回答 1

2

您需要在约束和属性之前int unsigned指定列类型,并且正确的类型是,而不是unsigned int

...
ID int unsigned not null auto_increment,
...
于 2012-09-16T09:22:02.390 回答