当我尝试在sql workbench中使用forward enginner函数时,我在最后一步得到了这个错误。知道为什么吗?
在服务器
中执行SQL脚本ERROR: Error 1064: 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 ')
REFERENCES `mydb`.`Account` ()
ON DELETE NO ACTION
ON UPDATE NO AC' at line 13
SQL Code:
-- -----------------------------------------------------
-- Table `mydb`.`ContactDetail`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `mydb`.`ContactDetail` (
`ContactDetailId` INT NOT NULL AUTO_INCREMENT COMMENT '',
`AccountId` VARCHAR(45) NOT NULL COMMENT '',
`Name` VARCHAR(45) NOT NULL COMMENT '',
`FirstName` VARCHAR(45) NOT NULL COMMENT '',
`Sex` ENUM('male', 'female') NOT NULL COMMENT '',
PRIMARY KEY (`ContactDetailId`) COMMENT '',
UNIQUE INDEX `ContactDetailId_UNIQUE` (`ContactDetailId` ASC) COMMENT '',
CONSTRAINT `AccountId`
FOREIGN KEY ()
REFERENCES `mydb`.`Account` ()
ON DELETE NO ACTION
ON UPDATE NO ACTION)
ENGINE = InnoDB
SQL脚本执行完成:语句:6成功,1失败
以最终形式获取视图定义。 没什么可取的