簡體   English   中英

PHPMyAdmin中的錯誤#1064

[英]Error #1064 in PHPMyAdmin

任何人都可以告訴我為什么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) 
  );

您需要約束和屬性之前指定列類型,正確的類型是int unsigned ,而不是unsigned int

...
ID int unsigned not null auto_increment,
...

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM