任何想法为什么我不能创建 Clinical_QUestions 表?
CREATE TABLE IF NOT EXISTS `test`.`Questions` (
`QuestionID` INT NOT NULL ,
`Question` VARCHAR(45) NULL ,
`VersionNumber` INT NULL ,
`Core` TINYINT(1) NULL ,
PRIMARY KEY (`QuestionID`) )
ENGINE = InnoDB;
我无法创建此表
CREATE TABLE IF NOT EXISTS `test`.`Clinical_Questions` (
`ClinicalID` INT NOT NULL ,
`QuestionID` INT NULL ,
`Effective Week` INT NULL ,
PRIMARY KEY (`ClinicalID`) ,
INDEX `QuestionID_idx` (`QuestionID` ASC) ,
CONSTRAINT `QuestionID`
FOREIGN KEY (`QuestionID` )
REFERENCES `test`.`Questions` (`QuestionID` )
ON DELETE NO ACTION
ON UPDATE NO ACTION,
CONSTRAINT `ClinicalID`
FOREIGN KEY (`ClinicalID` )
REFERENCES `test`.`Clinical` (`ClinicalID` )
ON DELETE NO ACTION
ON UPDATE NO ACTION)
ENGINE = InnoDB;
错误 1005 (HY000): 无法创建表 'certestdb.Clinical_Questions' (errno: 121)
CREATE TABLE IF NOT EXISTS `test`.`Overall_Week_Rating` (
`ClinicalID` INT NOT NULL ,
`Instructor_Rating` INT NULL ,
`DateTime_Instructor_Rating` DATETIME NULL ,
`Student_Rating` INT NULL ,
`DateTime_Student_Rating` DATETIME NULL ,
PRIMARY KEY (`ClinicalID`) ,
CONSTRAINT `UserID`
FOREIGN KEY (`ClinicalID` )
REFERENCES `test`.`Clinical` (`ClinicalID` )
ON DELETE NO ACTION
ON UPDATE NO ACTION)
ENGINE = InnoDB;