CREATE TABLE LOGOPERAEXP
(
	NMTABELA            VARCHAR2(20)           NOT NULL,
	DTOPERACAO          DATE                   NOT NULL,
	NMRESPOPER          VARCHAR2(40)           NOT NULL,
	CDPESQITEM          VARCHAR2(80)           NOT NULL,
	CDPESQ_EXP          VARCHAR2(80)           NOT NULL,
	DSTIPOOPER          VARCHAR2(20)           NOT NULL,
	DSOPERACAO          VARCHAR2(300)          NOT NULL,
	DSRDMUSUOPER        VARCHAR2(50)           NULL    ,
	DSENDUSUOPER        VARCHAR2(50)           NULL    ,
	DSNMUSUOPER         VARCHAR2(50)           NULL    ,
	DSMETUSUOPER        VARCHAR2(250)          NULL    ,
	CDORESPOPER         VARCHAR2(12)           NULL    ,
    NRORG             	NUMBER 	      		   DEFAULT SYS_CONTEXT('nrorg_ctx','nrorg') 	NOT NULL,
    IDATIVO           	VARCHAR2(1)     	   DEFAULT 'S' 									NOT NULL
      CONSTRAINT CKC_IDATIVO_LOGOPERAEXP 	   CHECK (IDATIVO IN ('S','N')),
    DTINCLUSAO        	DATE            	   DEFAULT SYSDATE,
    DTULTATU          	DATE            	   DEFAULT SYSDATE,
    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'
)
/

ALTER TABLE PAREXPEDICAO ADD IDBLOQINCOSGERNF VARCHAR2(1) DEFAULT 'N' NOT NULL 
	CONSTRAINT CKC_IDBLOQINCOSGERNF_PAREXP  CHECK (IDBLOQINCOSGERNF  IN ('S','N'))
/