我的java无法执行此代码,并给出了类似“无法添加键约束”的错误 请帮帮我
st.executeUpdate("CREATE TABLE `e166713`.`shopping` ( "
`idShopping` INT NOT NULL,
`idUser` VARCHAR(45) NULL,
PRIMARY KEY (`idShopping`),
INDEX `user_idx` (`idUser` ASC),
CONSTRAINT `user`
FOREIGN KEY (`idUser`)
REFERENCES `e166713`.`user` (`uID`)
ON DELETE NO ACTION
ON UPDATE NO ACTION)");
答案 0 :(得分:1)