CREATE TABLE LOGPREVCONSPME(
    CDFILCENTPME   VARCHAR2(4)  NOT NULL,
    CDTIPOCARD     VARCHAR2(10) NULL,
    CDSERVFILI     VARCHAR2(5)  NULL,
    CDFILIAL       VARCHAR2(4)  NULL,
    CDOPERADOR     VARCHAR2(12) NOT NULL,
    DTHRCALCPR     DATE         NOT NULL,
    DTINICIALPC    DATE         NOT NULL,
    DTFINALPC      DATE         NOT NULL,
    CDPRODINICPC   VARCHAR2(10) NULL, 
    CDPRODFINAPC   VARCHAR2(10) NULL,
    PEACRESCIMPR   FLOAT(126)   NULL,
    NRCONSPLANPC   VARCHAR2(10) NOT NULL,
    NRORG          NUMBER       DEFAULT SYS_CONTEXT('nrorg_ctx','nrorg')  NOT NULL,
    IDATIVO        VARCHAR2(1)  DEFAULT 'S' NOT NULL 
      CONSTRAINT CKC_IDATIVO_LOGPREVCONSPME CHECK (IDATIVO IN ('S','N')),
    DTINCLUSAO     DATE         DEFAULT SYSDATE NULL,
    DTULTATU       DATE         DEFAULT SYSDATE NULL,
    NRORGINCLUSAO  NUMBER       DEFAULT SYS_CONTEXT('nrorg_ctx','nrorg') NOT NULL ,
    CDOPERINCLUSAO VARCHAR2(12) DEFAULT '1' NULL,
    NRORGULTATU    NUMBER       DEFAULT  SYS_CONTEXT('nrorg_ctx','nrorg') NOT NULL ,
    CDOPERULTATU   VARCHAR2(12) DEFAULT '1' NOT NULL,
    CONSTRAINT PK_LOGPREVCONSPME PRIMARY KEY (CDFILCENTPME, CDTIPOCARD, CDSERVFILI, CDFILIAL, CDOPERADOR, DTHRCALCPR, NRCONSPLANPC)
)
/