Advertisement
Guest User

Untitled

a guest
Aug 17th, 2018
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. create table Compra(
  2.     Id serial not null,
  3.     NumFactura char(25) not null,
  4.     NombreProveedor char(25) not null,
  5.     Fecha date not null,
  6.     CONSTRAINT PK_COMPRA PRIMARY KEY (Id)
  7. );
  8.  
  9. create table CompraXInsumo(
  10.     IdInsumo int not null REFERENCES Insumos(Id),
  11.     NumFactura char(25) not null REFERENCES Compra(NumFactura),
  12.     IdFactura int not null REFERENCES Compra(Id),
  13.     Cantidad int not null,
  14.     PrecioUnitario int not null,
  15.     ImpuestoUnitario float not null
  16.    
  17. );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement