Ver Mensaje Individual
  #1 (permalink)  
Antiguo 27/05/2015, 22:52
Nappalm
 
Fecha de Ingreso: mayo-2015
Mensajes: 1
Antigüedad: 9 años
Puntos: 0
Error 1215 Mysql WorkBench

Tengo dos tablas relacionadas:



Alguien que me ayude a resolver el problema :/
Código MySQL:
Ver original
  1. SQL Code:
  2.         -- -----------------------------------------------------
  3.         -- Table `Fincas`.`Vivienda_Particular`
  4.         -- -----------------------------------------------------
  5.         CREATE TABLE IF NOT EXISTS `Fincas`.`Vivienda_Particular` (
  6.           `Cod_Comunidad` INT NOT NULL,
  7.           `Portal` VARCHAR(15) NOT NULL,
  8.           `Planta` VARCHAR(15) NOT NULL,
  9.           `Letra` VARCHAR(1) NOT NULL,
  10.           `N_Habitaciones` INT NOT NULL,
  11.           INDEX `Cod_Comunidad_idx` (`Cod_Comunidad` ASC),
  12.           INDEX `Portal_idx` (`Portal` ASC),
  13.           INDEX `Planta_idx` (`Planta` ASC),
  14.           INDEX `Letra_idx` (`Letra` ASC),
  15.           CONSTRAINT `Cod_Comunidad`
  16.             FOREIGN KEY (`Cod_Comunidad`)
  17.             REFERENCES `Fincas`.`Propiedad` (`Cod_Comunidad`)
  18.             ON DELETE NO ACTION
  19.             ON UPDATE NO ACTION,
  20.           CONSTRAINT `Portal`
  21.             FOREIGN KEY (`Portal`)
  22.             REFERENCES `Fincas`.`Propiedad` (`Portal`)
  23.             ON DELETE NO ACTION
  24.             ON UPDATE NO ACTION,
  25.           CONSTRAINT `Planta`
  26.             FOREIGN KEY (`Planta`)
  27.             REFERENCES `Fincas`.`Propiedad` (`Planta`)
  28.             ON DELETE NO ACTION
  29.             ON UPDATE NO ACTION,
  30.           CONSTRAINT `Letra`
  31.             FOREIGN KEY (`Letra`)
  32.             REFERENCES `Fincas`.`Propiedad` (`Letra`)
  33.             ON DELETE NO ACTION
  34.             ON UPDATE NO ACTION)
  35.         ENGINE = InnoDB
  36.  
  37. SQL script execution finished: statements: 12 succeeded, 1 failed
  38.  
  39. Fetching back view definitions in final form.
  40. Nothing to fetch