当我在 phpMyAdmin 和 Sequel 上运行以下查询时,出现以下错误
#1064 - 您的 SQL 语法有错误;检查与您的 MySQL 服务器版本相对应的手册,以在第 3 行的“id Int UNSIGNED NOT NULL AUTO_INCREMENT, login Char(128) NOT NULL, passw”附近使用正确的语法。
我无法弄清楚这个查询的错误。Mysql 运行在 5.5.25 版本上。
CREATE TABLE user
(
id Int UNSIGNED NOT NULL AUTO_INCREMENT,
login Char(128) NOT NULL,
password Char(128) NOT NULL,
emailaddress Char(128),
alternateemailaddress Char(128),
officephone Char(20),
officefax Char(20),
mobilephone Char(20),
client Int UNSIGNED,
facility Int UNSIGNED,
user_status Int UNSIGNED NOT NULL DEFAULT 0,
valid_from Datetime NOT NULL,
valid_to Datetime NOT NULL,
last_login Datetime,
last_login_from Char(48),
modified_by Int NOT NULL,
modified_time Datetime,
PRIMARY KEY (id),
FOREIGN KEY client REFERENCES client (id) ON DELETE CASCADE,
FOREIGN KEY facility REFERENCES facility (id) ON DELETE CASCADE
) ENGINE = InnoDB
AUTO_INCREMENT = 0
;