我只是不明白为什么在创建此表时出现语法错误:
CREATE TABLE IF NOT EXISTS Tasks (
ID INT UNSIGNED NOT NULL auto_increment,
Name VARCHAR(255) DEFAULT '' NOT NULL,
Description TEXT,
Date TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
Status ENUM('New', 'Assigned', 'In Progress', 'On Hold', 'Done', 'Canceled'),
Priority ENUM('Urgent', 'High', 'Normal', 'Low'),
Creator SMALLINT UNSIGNED DEFAULT '0' NOT NULL,
Assignee SMALLINT UNSIGNED,
Starting DATETIME,
Deadline DATETIME,
Completion DATETIME,
PRIMARY KEY(ID)
) ENGINE = INNODB;
给我:
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that
corresponds to your MySQL server version for the right syntax to use near
'Starting DATETIME,
Deadline DATETIME,
Completion DATETIME,
PRIMARY KEY(ID)
) ENG' at line 10
看起来它给我的日期时间带来了麻烦,但为什么呢?我已经在另一个表中使用了它并且它正在工作。
谢谢。