ayuda
Error
consulta SQL:
CREATE TABLE IF NOT EXISTS `baseagencia`.`producto` (
`id_producto` INT GENERATED ALWAYS AS () VIRTUAL,
`barcode` VARCHAR(45) NULL,
`nombre` VARCHAR(45) NOT NULL,
`descripcion` VARCHAR(255) NULL,
`id_provedor` INT NULL,
`stock` INT NOT NULL,
`costo` DECIMAL(7,2) NOT NULL,
`unidad_medida` VARCHAR(20) NOT NULL,
PRIMARY KEY (`id_producto`),
UNIQUE INDEX `barcode_UNIQUE` (`barcode` ASC),
INDEX `fk_producto_provedor_idx` (`id_provedor` ASC),
CONSTRAINT `fk_producto_provedor`
FOREIGN KEY (`id_provedor`)
REFERENCES `baseagencia`.`provedor` (`id_persona`)
ON DELETE NO ACTION
ON UPDATE NO ACTION)
ENGINE = InnoDB
MySQL ha dicho: Documentación
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ') VIRTUAL,
`barcode` VARCHAR(45) NULL,
`nombre` VARCHAR(45) NOT NULL,
`des' at line 2
Subject
Views
Written By
Posted
ayuda
954
August 19, 2016 11:04AM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.