Hola amig@s
Os paso un create de una tabla, pero me da error. Me dice que las FK estan mal definidas pero no se que hacer.
Código:
CREATE TABLE `dbequipos`.`equipos` (
`pknumserie` VARCHAR(15) NOT NULL,
`nombrepc` VARCHAR(10) NOT NULL,
`marca` VARCHAR(10) NOT NULL,
`funcion` VARCHAR(10) NOT NULL,
`sistoper` VARCHAR(20) NOT NULL,
`comentarios` VARCHAR(255) NOT NULL,
PRIMARY KEY(`pknumserie`),
CONSTRAINT `FKmarca` FOREIGN KEY `FKmarca` (`marca`)
REFERENCES `marca` (`idmarca`),
CONSTRAINT `FKfuncion` FOREIGN KEY `FKfuncion` (`funcion`)
REFERENCES `funcion` (`idfuncion`),
CONSTRAINT `FKso` FOREIGN KEY `FKso` (`sistoper`)
REFERENCES `sistoper` (`idso`)
)
ENGINE = InnoDB;
Muchas gràcias.