ALTER TABLE EDITSUBSCOMPMENU ADD
	CONSTRAINT FKCOC00672EDITSUBSCOMPMENU FOREIGN KEY (NRSUBSCOMPMENU, NRORG)
		REFERENCES SUBSCOMPMENU (NRSUBSCOMPMENU, NRORG)
/
CREATE INDEX FKCOC00672EDITSUBSCOMPMENU ON EDITSUBSCOMPMENU (NRSUBSCOMPMENU, NRORG)
/
ALTER TABLE EDITSUBSCOMPMENU ADD
	CONSTRAINT FKCOC00673EDITPRODSUBSEMAM FOREIGN KEY (CDFILIAL, CDCIA, CDMANCIA, NRSERVICOCIAFILI, CDCLASSE, CDSUBGRU, NRSEQSUBGRUSEMAM, CDCICLO, CDPRODUTO, NRORG)
		REFERENCES PRODSUBSEMAM (CDFILIAL, CDCIA, CDMANCIA, NRSERVICOCIAFILI, CDCLASSE, CDSUBGRU, NRSEQSUBGRUSEMAM, CDCICLO, CDPRODUTO, NRORG)
/
CREATE INDEX FKCOC00673EDITPRODSUBSEMAM ON EDITSUBSCOMPMENU (CDFILIAL, CDCIA, CDMANCIA, NRSERVICOCIAFILI, CDCLASSE, CDSUBGRU, NRSEQSUBGRUSEMAM, CDCICLO, CDPRODUTO, NRORG)
/
ALTER TABLE EDITSUBSCOMPMENU ADD
	CONSTRAINT FKCOC00674EDITRECSUBSEMAM FOREIGN KEY (CDFILIAL, CDCIA, CDMANCIA, NRSERVICOCIAFILI, CDCLASSE, CDSUBGRU, NRSEQSUBGRUSEMAM, CDCICLO, CDRECEITA, NRORG)
		REFERENCES RECSUBSEMAM (CDFILIAL, CDCIA, CDMANCIA, NRSERVICOCIAFILI, CDCLASSE, CDSUBGRU, NRSEQSUBGRUSEMAM, CDCICLO, CDRECEITA, NRORG)
/
CREATE INDEX FKCOC00674EDITRECSUBSEMAM ON EDITSUBSCOMPMENU (CDFILIAL, CDCIA, CDMANCIA, NRSERVICOCIAFILI, CDCLASSE, CDSUBGRU, NRSEQSUBGRUSEMAM, CDCICLO, CDRECEITA, NRORG)
/
ALTER TABLE EDITSUBSCOMPMENU ADD
	CONSTRAINT FKCOC00675NOVOPRODUTO FOREIGN KEY (CDPRODUTONOVO, NRORG)
		REFERENCES PRODUTO (CDPRODUTO, NRORG)
/
CREATE INDEX FKCOC00675NOVOPRODUTO ON EDITSUBSCOMPMENU (CDPRODUTONOVO, NRORG)
/
ALTER TABLE EDITSUBSCOMPMENU ADD
	CONSTRAINT FKCOC00676NOVARECEITA FOREIGN KEY (CDRECEITANOVO, NRORG)
		REFERENCES RECEITAM (CDRECEITA, NRORG)
/
CREATE INDEX FKCOC00676NOVARECEITA ON EDITSUBSCOMPMENU (CDRECEITANOVO, NRORG)
/
ALTER TABLE EDITSUBSCOMPMENU ADD
	CONSTRAINT UN_EDITPRODRECSUBSEMAM UNIQUE (NRSUBSCOMPMENU, CDFILIAL, CDCIA, CDMANCIA, NRSERVICOCIAFILI, CDCLASSE, CDSUBGRU, NRSEQSUBGRUSEMAM, CDCICLO, CDPRODUTONOVO, CDRECEITANOVO, NRORG)