ALTER TABLE PRODFILI ADD (
  CDALMOXPRODPL VARCHAR2(6) DEFAULT NULL NULL, 
  CDLOCPRODPL VARCHAR2(6) DEFAULT NULL NULL, 
  CDALMOXPROD VARCHAR2(6) DEFAULT NULL NULL, 
  CDLOCPROD VARCHAR2(6) DEFAULT NULL NULL
)
/
ALTER TABLE PRODFILI ADD CONSTRAINT FKPED00370ALMOXARIFADO FOREIGN KEY (CDFILIAL, CDALMOXPRODPL, NRORG) REFERENCES ALMOXARIFADO (CDFILIAL, CDALMOXARIFE, NRORG)
/
ALTER TABLE PRODFILI ADD CONSTRAINT FKPED00371LOCALESTOQUE FOREIGN KEY (CDFILIAL, CDALMOXPRODPL, CDLOCPRODPL, NRORG) REFERENCES LOCALESTOQUE (CDFILIAL, CDALMOXARIFE, CDLOCALESTOQ, NRORG)
/
ALTER TABLE PRODFILI ADD CONSTRAINT FKPED00372ALMOXARIFADO FOREIGN KEY (CDFILIAL, CDALMOXPROD, NRORG) REFERENCES ALMOXARIFADO (CDFILIAL, CDALMOXARIFE, NRORG)
/
ALTER TABLE PRODFILI ADD CONSTRAINT FKPED00370LOCALESTOQUE FOREIGN KEY (CDFILIAL, CDALMOXPROD, CDLOCPROD, NRORG) REFERENCES LOCALESTOQUE (CDFILIAL, CDALMOXARIFE, CDLOCALESTOQ, NRORG)
/
ALTER TABLE LOTITRETIEST ADD (
  IDMANUAL VARCHAR2(1) DEFAULT 'N' NOT NULL
)