ALTER TABLE PARAMPLANEJA ADD IDPESAPAETIQ VARCHAR2(1) DEFAULT 'N' NOT NULL
	CONSTRAINT CKC_IDPESAPAETIQ CHECK (IDPESAPAETIQ IN ('S', 'N'))
/
CREATE TABLE ETIQUETACOZ (
	NRETIQUETACOZ			NUMBER 														NOT NULL,
	NRPLANPROD				NUMBER 														NOT NULL, 
	NRCARDACLIPLANPROD 		NUMBER 														NULL,
	QTREAL 					FLOAT														NULL,
	CDCONTAINER 			VARCHAR2(5)													NULL,
	CDPRODUTO               VARCHAR2(10)                                                NULL,
	IDIMPRESSO 				VARCHAR2(1) 	DEFAULT 'N' 								NOT NULL
		CONSTRAINT CKC_IDIMPRESSO_ETIQUETACOZ CHECK (IDIMPRESSO IN ('S', 'N')),
	NRORG 					NUMBER			DEFAULT SYS_CONTEXT('nrorg_ctx','nrorg') 	NOT NULL,
	IDATIVO 				VARCHAR2(1) 	DEFAULT 'S' 								NOT NULL
		CONSTRAINT CKC_IDATIVO_ETIQUETACOZ CHECK (IDATIVO IN ('S', 'N')),
	DTINCLUSAO 				DATE 														NULL,
	DTULTATU 				DATE 														NULL,
	NRORGINCLUSAO 			NUMBER 			DEFAULT SYS_CONTEXT('nrorg_ctx','nrorg') 	NULL,
	CDOPERINCLUSAO 			VARCHAR2(12) 	DEFAULT '1' 								NULL,
	NRORGULTATU 			NUMBER 			DEFAULT SYS_CONTEXT('nrorg_ctx','nrorg')	NULL,
	CDOPERULTATU 			VARCHAR2(12) 	DEFAULT '1' 								NULL,
	CONSTRAINT PK_ETIQUETACOZ PRIMARY KEY (NRETIQUETACOZ)
)
/
ALTER TABLE ETIQUETACOZ ADD
	CONSTRAINT FKCOZ00001PLANPRODUCAO FOREIGN KEY (NRPLANPROD)
		REFERENCES PLANPRODUCAO (NRPLANPROD)
/
CREATE INDEX FKCOZ00001PLANPRODUCAO ON ETIQUETACOZ (NRPLANPROD)
/
ALTER TABLE ETIQUETACOZ ADD
	CONSTRAINT FKCOZ00002CARDACLIPLANPROD FOREIGN KEY (NRCARDACLIPLANPROD)
		REFERENCES CARDACLIPLANPROD (NRCARDACLIPLANPROD)
/
CREATE INDEX FKCOZ00002CARDACLIPLANPROD ON ETIQUETACOZ (NRCARDACLIPLANPROD)
/
ALTER TABLE ETIQUETACOZ ADD
	CONSTRAINT FKCOZ00003CONTAINER FOREIGN KEY (CDCONTAINER)
		REFERENCES CONTAINER (CDCONTAINER)
/
CREATE INDEX FKCOZ00003CONTAINER ON ETIQUETACOZ (CDCONTAINER)