ALTER TABLE NOTAMAPAEXBAD
ADD CONSTRAINT FKPED00450MAPCPERIOD_NTMPAEXBD FOREIGN KEY (CDVENDEDOR, CDFILICOMIS, NRMAPACOMIS)
   REFERENCES MAPACOMPERIODO (CDVENDEDOR, CDFILICOMIS, NRMAPACOMIS) ON DELETE CASCADE
/
CREATE INDEX PED00450_FK ON NOTAMAPAEXBAD (CDVENDEDOR, CDFILICOMIS, NRMAPACOMIS ASC)
/

ALTER TABLE NOTAFISCAL ADD IDNOTAMAPAEXBAD  VARCHAR2(1)
   CONSTRAINT CKC_IDNOTAMAPAEXBAD_NOTAFISCAL CHECK (IDNOTAMAPAEXBAD IN ('S','N'))
/