TIMESTAMP的MySQL错误

时间:2014-06-19 00:43:45

标签: mysql

$sql = "CREATE TABLE heros (
ID int NOT NULL AUTO_INCREMENT PRIMARY KEY,
battletag varchar(64) ,
name varchar(32),
id int,
level int,
hardcore bool,
gender bool,
dead bool,
class varchar(32),
updated TIMESTAMP
";

收到错误:

  

创建表时出错:SQL语法中有错误;检查   手册,对应右边的MySQL服务器版本   在'第11行'附近使用的语法

1 个答案:

答案 0 :(得分:1)

您忘记了结束)字符。清洗:

CREATE TABLE heros (
    ID int NOT NULL AUTO_INCREMENT PRIMARY KEY,
    battletag varchar(64) ,
    name varchar(32),
    id int,
    level int,
    hardcore bool,
    gender bool,
    dead bool,
    class varchar(32),
    updated TIMESTAMP
)