Guest User

Untitled

a guest
Jan 17th, 2018
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.61 KB | None | 0 0
  1. CREATE TABLE tb_cabcin (
  2. NroDocCCI CHAR(6),
  3. CodEnt int,
  4. FecEmiCCI Date,
  5. CodCli int,
  6. ImpTotCCI Decimal(8,2),
  7. PRIMARY KEY (NroDocCCI, CodEnt),
  8. FOREIGN KEY (CodEnt) references tb_ent(CodEnt),
  9. FOREIGN KEY (CodCli) references tb_cli(CodCli)
  10. );
  11.  
  12. CREATE TABLE tb_detcin (
  13. CodDCI serial,
  14. NroDocCCI CHAR(6),
  15. CodEnt int,
  16. CodPrd int,
  17. PsoDCI Decimal(8,2),
  18. PreDCI Decimal(8,2),
  19. ImpDCI Decimal(8,2),
  20. CntItm int,
  21. ObsDCI text,
  22. PRIMARY KEY (CodDCI, NroDocCCI, CodEnt),
  23. FOREIGN KEY (NroDocCCI, CodEnt)
  24. references tb_cabcin(NroDocCCI, CodEnt) ON DELETE CASCADE ON UPDATE CASCADE,
  25. FOREIGN KEY (CodPrd) references tb_prd(CodPrd)
  26. );
Add Comment
Please, Sign In to add comment