Created
June 24, 2020 04:51
-
-
Save parzibyte/3e927239277f3010e07dd43e81cb85d4 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DROP DATABASE IF EXISTS ventas; | |
CREATE DATABASE IF NOT EXISTS ventas; | |
USE ventas; | |
CREATE TABLE productos( | |
id BIGINT UNSIGNED NOT NULL AUTO_INCREMENT, | |
codigo VARCHAR(255) NOT NULL, | |
descripcion VARCHAR(255) NOT NULL, | |
precioVenta DECIMAL(5, 2) NOT NULL, | |
precioCompra DECIMAL(5, 2) NOT NULL, | |
existencia DECIMAL(5, 2) NOT NULL, | |
PRIMARY KEY(id) | |
) ENGINE = InnoDB DEFAULT CHARACTER SET = utf8; | |
INSERT INTO productos(id, codigo, descripcion, precioVenta, precioCompra, existencia) | |
VALUES | |
(1, '1', 'Galletas chokis', 15, 10, 100), | |
(2, '2', 'Mermelada de fresa', 80, 65, 100), | |
(3, '3', 'Aceite', 20, 18, 100), | |
(4, '4', 'Palomitas de maíz', 15, 12, 100), | |
(5, '5', 'Doritos', 8, 5, 100), | |
(6, '6', 'Electrolit suero rehidratante', 50, 60, 100), | |
(7, '7', 'Teclado HyperX', 2000, 1800, 100), | |
(8, '8', 'Mouse Logitech', 700, 500, 100), | |
(9, '9', 'Audífonos Xiaomi', 400, 300, 100), | |
(10, '10', 'Monitor Samsung', 2300, 2000, 100); | |
# Correcto |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment