CREATE TABLE RELACITEMPBASE(
    CDPRECOBASE      VARCHAR2(04) NOT NULL,
    CDPRODUTO        VARCHAR2(10) NOT NULL,
    NRSEQRELACPB     VARCHAR2(5) NOT NULL,
    DTINIVALIPB      VARCHAR2(10) NOT NULL,
    VRITEPREBASE     FLOAT NOT NULL,
    DTFIMVALIPB      DATE,        
    DTINICHANGE      DATE,         
    DTFIMCHANGE      DATE,
    DSERRO           VARCHAR2(2),
    NRORG             NUMBER 	      DEFAULT SYS_CONTEXT('nrorg_ctx','nrorg') 		NOT NULL,
    IDATIVO           VARCHAR2(1)     DEFAULT 'S'					NOT NULL,
    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',
	    CONSTRAINT CKC_IDATIVO_RELACITEMPBASE CHECK (IDATIVO IN ('S','N')),
        CONSTRAINT PK_RELACITEMPBASE PRIMARY KEY (CDPRECOBASE, CDPRODUTO, NRSEQRELACPB, DTINIVALIPB)
)
/