我正试图用手稿制作有关MySQL的表格,而MySQL数据库则保留给我150个错误。 我在纳维喀特和MySQL Workbench两处尝试了以下法典,并造成150个错误。
看来,这是一个外国的关键问题,但我实际上看看一下,我的法典存在什么问题,并想知道,是否有更多的受雇用的亚洲开发银行用户会对这个问题有任何异议?
SET FOREIGN_KEY_CHECKS=0;
CREATE TABLE `network_invites` (
`invite_ID` int(11) NOT NULL AUTO_INCREMENT,
`invite_From` int(11) NOT NULL,
`invite_Network` int(11) NOT NULL,
`invite_NetCreator` int(11) NOT NULL,
`invite_Message` varchar(256) NOT NULL,
`invite_Date` date DEFAULT NULL,
PRIMARY KEY (`invite_ID`),
KEY `invite_From` (`invite_From`),
KEY `invite_Network` (`invite_Network`),
KEY `invite_NetCreator` (`invite_NetCreator`),
CONSTRAINT `network_invites_ibfk_1` FOREIGN KEY (`invite_From`) REFERENCES `users` (`user_ID`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `network_invites_ibfk_2` FOREIGN KEY (`invite_Network`) REFERENCES `networks` (`network_ID`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `network_invites_ibfk_3` FOREIGN KEY (`invite_NetCreator`) REFERENCES `networks` (`network_Creator`) ON DELETE CASCADE ON UPDATE CASCADE
)ENGINE=InnoDB AUTO_INCREMENT=21 DEFAULT CHARSET=latin1;
I cant see what the FK problem is, those fields do exist on the DB and they are of the same datatype.
感谢任何帮助。