Documente Academic
Documente Profesional
Documente Cultură
Vendedor
Nombre, Teléfono, No. De Kiosko Móvil.
Código SQL
Create table Vendedor
(
KioskoNo integer,
Nombre Char (50),
Telefono Integer
)
Producto
Nombre, Marca, Modelo, Precio, Sistema Operativo
Código SQL
Create table Producto
(
Marca Char (50),
Modelo Char (50),
Precio Integer,
SO Char (50)
)
Cliente
Nombre, Teléfono, Nit, No. De Factura, Direccion
Código SQL
Create table Cliente
(
Nombre Char (50),
Nit Integer,
Direccion Char (50),
NoFac Integer,
Telefono Integer
)
Factura
No de Factura, Nombre, Nit, Fecha, Cantidad
Código SQL
Create table Factura
(
Nombre Char (50),
Nit Integer,
Fecha Date,
NoFac Integer,
Cantidad Integer
)
Proveedor
Nombre, Nit, Telefono, Direccion
Código SQL
Create table Proveedor
(
IdProve Integer,
Nombre Char (50),
Nit Integer,
Telefono Integer,
Direccion Char (50)
)
INSERTAR DATOS EN TABLAS
Facturas
Insert Into Factura (Nombre, Nit, Fecha, NoFac, Cantidad)
Values ('Luis Herrera',73792012,01-04-16,00001,3000);
Insert Into Factura (Nombre, Nit, Fecha, NoFac, Cantidad)
Values ('Christopher Lemus',65439913,10-04-16,00002,1500);
Insert Into Factura (Nombre, Nit, Fecha, NoFac, Cantidad)
Values ('Mario Palencia',55938512,15-04-16,00003,2000);
Insert Into Factura (Nombre, Nit, Fecha, NoFac, Cantidad)
Values ('Denis Martinez',35719644,20-04-16,00004,2500)
Insert Into Factura (Nombre, Nit, Fecha, NoFac, Cantidad)
Values ('Enio Escriba',98673155,18-04-16,00005,1000);
Vendedor
Insert into vendedor (Nombre, Telefono,Kioskono) Values ('Andrea
Chacon',58231098,225)
Insert into vendedor (Nombre, Telefono,Kioskono) Values ('Kevin
Galindo',48728233,430)
Insert into vendedor (Nombre, Telefono,Kioskono) Values ('Luisa
Gandara',32492843,129)
Insert into vendedor (Nombre, Telefono,Kioskono) Values ('Daniel
Reyes',44885511,856)
Insert into vendedor (Nombre, Telefono,Kioskono) Values ('Maria Clara
Galicia',59813456,389)
Cliente
Insert into Cliente (Nombre, Nit, Direccion, NoFac, Telefono)
Values ('Luis Herrera',73792012,’Zacapa’,00001,41611398);
Insert into Cliente (Nombre, Nit, Direccion, NoFac, Telefono)
Values ('Christopher Lemus',751492,’Guatemala’,00002,56162106);
Insert into Cliente (Nombre, Nit, Direccion, NoFac, Telefono)
Values ('Mario Palencia',55938512,’Quetzaltenango’,00003,48629125);
Insert into Cliente (Nombre, Nit, Direccion, NoFac, Telefono)
Values ('Denis Martinez',35719644,’Peten’,00004,23234723)
Insert into Cliente (Nombre, Nit, Direccion, NoFac, Telefono)
Values ('Enio Escriba',98673155,’Escuintla’,00005,49273923);
Producto
Insert into Producto (Marca, Modelo, Precio, SO)
Values ('Samsung','Galaxy S6 EDGE',3000,'Android 6.1');
Insert into Producto (Marca, Modelo, Precio, SO)
Values ('Huawei','Mate 7',2500,'Android 6.0');
Insert into Producto (Marca, Modelo, Precio, SO)
Values ('LG','G3',1500,'Android 4.4.1');
Insert into Producto (Marca, Modelo, Precio, SO)
Values ('Iphone','4',2000,'IOS 5');
Insert into Producto (Marca, Modelo, Precio, SO)
Values ('Alcatel','Idol 2',1000,'Android 5.1');
Proveedor
Insert into Proveedor (Idprove,Nombre, Nit, Telefono, Direccion)
Values (01,'Alcatel',12349,87812721,'Francia');
Insert into Proveedor (Idprove,Nombre, Nit, Telefono, Direccion)
Values (02,'Samsung',98761,45982309,'Corea del Sur');
Insert into Proveedor (Idprove,Nombre, Nit, Telefono, Direccion)
Values (03,'Huawei',543219,494721766,'China');
Insert into Proveedor (Idprove,Nombre, Nit, Telefono, Direccion)
Values (04,'LG',598122,32722334,'Italia');
Insert into Proveedor (Idprove,Nombre, Nit, Telefono, Direccion)
Values (05,'Apple',985651,55776655,'Estados Unidos');
UPDATE Producto
SET Precio = 4500
WHERE Precio = 3000
Usamos el comando SELEC para hacer consultas, en este Caso Buscamos en las
Tablas Factura y Producto, Que producto se Vendio con la factura No.5