I am having a problem on the creation of my table.
The problem lays with the creation of the foreign key/relation to antoher table.
The internet told me to check the column type and check if it was the same as the column which i was referencing to. and its the same.
Futher solutions the internet gave me didn't work So can anyone please help me?
This is the query :
CREATE TABLE IF NOT EXISTS `finprodb`.`tblproject` (
`prj_id` INT(11) NOT NULL AUTO_INCREMENT ,
`prj_nummer` VARCHAR(45) NOT NULL ,
`prj_omschrijving` TEXT NULL DEFAULT NULL ,
`prj_verkoop_waarde` DECIMAL(20,4) NULL DEFAULT NULL ,
`prj_gereed` TINYINT(4) NULL DEFAULT NULL ,
`prj_bedr_id` INT(11) NOT NULL ,
PRIMARY KEY (`prj_id`) ,
UNIQUE INDEX `prj_id_UNIQUE` (`prj_id` ASC) ,
INDEX `fk_tblproject_tblbedrijf1_idx` (`prj_bedr_id` ASC) ,
CONSTRAINT `fk_tblproject_tblbedrijf1`
FOREIGN KEY (`prj_bedr_id` )
REFERENCES `finprodb`.`tblbedrijf` (`bedr_id` )
ON DELETE SET NULL
ON UPDATE CASCADE)
ENGINE = InnoDB
DEFAULT CHARACTER SET = utf8
COLLATE = utf8_general_ci
SHOW ENGINE innodb STATUSquery.