ALTER TABLE ITEMPEDRELACOL DROP CONSTRAINT FKPED00440ITEMOL
/

ALTER TABLE ITEMPEDRELACOL ADD
	CONSTRAINT FKPED00440ITEMOL  FOREIGN KEY (CDFILDEST, CDFILLANC, NRPEDEXOL, CDMARCA, CDPRODUTO, DTPROGENPEOL)
		REFERENCES ITEMPEDEXOL (CDFILDEST, CDFILLANC, NRPEDEXOL, CDMARCA, CDPRODUTO, DTPROGENPEOL) ON DELETE CASCADE
/

ALTER TABLE ITEMPEDRELACOL DROP CONSTRAINT FKPED00441ITEMPED
/

ALTER TABLE ITEMPEDRELACOL ADD
	CONSTRAINT  FKPED00441ITEMPED  FOREIGN KEY (CDFILIAL, NRPEDIDO, NRITEMPED) 
		REFERENCES ITEMPEDIDO (CDFILIAL, NRPEDIDO, NRITEMPED) ON DELETE CASCADE
/

CREATE SEQUENCE SEQ_NRITEMPEDRELACOL INCREMENT BY 1 MINVALUE 10