CREATE TABLE CTRLEMPENHOEXP
(
NREMPENHOEXP     	VARCHAR2(10)  NOT NULL,
CDFILIAL         	VARCHAR2(4)   NOT NULL,
NRPEDIDO         	VARCHAR2(10)  NOT NULL,
NRITEMPED        	VARCHAR2(10)  NOT NULL, 
NRRESPRODPED     	VARCHAR2(10)  NOT NULL, 
CDPRODUTO        	VARCHAR2(10)  NOT NULL,
DSPRODUTO        	VARCHAR2(100) NOT NULL,
DSDESCRICAO      	VARCHAR2(100) NOT NULL,
DSOPERADOR       	VARCHAR2(100) NOT NULL,
NRORG 			 	NUMBER 			    DEFAULT SYS_CONTEXT('nrorg_ctx','nrorg') NOT NULL,
IDATIVO 			VARCHAR2(1) 	 	DEFAULT 'S' NOT NULL
   CONSTRAINT CKC_IDATIVO_CTRLEMPENHOEXP 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',
   CONSTRAINT PK_CTRLEMPENHOEXP PRIMARY KEY (NREMPENHOEXP, CDFILIAL, NRPEDIDO, NRITEMPED, NRRESPRODPED)
)
/