· 8 years ago · May 28, 2018, 01:14 AM
1CREATE TABLE IF NOT EXISTS `SUBEdb`.`DocumentoPersona` (
2 `idDocumento` INT NOT NULL AUTO_INCREMENT,
3 `numero` INT(4) NOT NULL,
4 `tipo` INT NOT NULL,
5 PRIMARY KEY (`idDocumento`),
6 CONSTRAINT `fk_DocumentoPersona_Persona1`
7 FOREIGN KEY (`idDocumento`)
8 REFERENCES `SUBEdb`.`Persona` (`idPersona`)
9 ON DELETE NO ACTION
10 ON UPDATE NO ACTION)
11ENGINE = InnoDB