कॉलम से प्रकार बदलें idParent
करने के लिए int(10) unsigned
. तो यह उसी प्रकार का है जैसे संदर्भित कॉलम idBC
।
DROP TABLE IF EXISTS `biological classification`;
CREATE TABLE `biological classification` (
`idBC` int(10) unsigned NOT NULL AUTO_INCREMENT,
`idParent` int(10) unsigned DEFAULT NULL,
`type` varchar(45) DEFAULT NULL,
`value` varchar(45) DEFAULT NULL,
PRIMARY KEY (`idBC`),
UNIQUE KEY `idnew_table_UNIQUE` (`idBC`),
CONSTRAINT `SelfKey` FOREIGN KEY (`idParent`) REFERENCES `biological classification` (`idBC`) ON DELETE NO ACTION ON UPDATE NO ACTION
) ENGINE=InnoDB AUTO_INCREMENT=20 DEFAULT CHARSET=latin1 COMMENT='A table that contains the Biological Classification of anima';