ALTER TABLE FLUXPRODREC ADD CONSTRAINT FKCOC00735TIPONEGOCIOINF FOREIGN KEY (NRTIPONEGOCIOINF, NRORG) REFERENCES TIPONEGOCIOINF (NRTIPONEGOCIOINF, NRORG)
/
ALTER TABLE FLUXPRODREC ADD CONSTRAINT FKCOC00737RECEITAM FOREIGN KEY (ROOT_CDRECEITA, NRORG) REFERENCES RECEITAM (CDRECEITA, NRORG)
/
CREATE UNIQUE INDEX UN_FLUXPRODREC ON FLUXPRODREC (CDFILIAL, CDSETOR, NRCATEGORIAPROD, NRSUBCATEGORIAPROD, CDRECEITA, NRTIPOPROD, NRTIPONEGOCIOINF, CDCIA, NRVOO, PAI_CDRECEITA, ROOT_CDRECEITA, NRORG)
/
ALTER TABLE FLUXPRODREC ADD CONSTRAINT CKC_IDROOTDEPENDEN_FLUXPRODREC CHECK (IDROOTDEPENDENT IN ('0', '1'))
/
ALTER TABLE FLUXPRODREC ADD CONSTRAINT CKC_IDPARENTDEPEND_FLUXPRODREC CHECK (IDPARENTDEPENDENT IN ('0', '1'))
/
ALTER TABLE FLUXPRODREC ADD CONSTRAINT CKC_IDABRANTPN_FLUXPRODREC CHECK (IDABRANTPN IN ('0', '1'))