CREATE TABLE ETLCOMERCIALMENSAL
   (	
        NRSEQFATCOM           VARCHAR2(12) NOT NULL ENABLE, 
	QTCONTATOS            FLOAT(126), 
	CDFILIAL              VARCHAR2(4), 
	CDMOTICONT            VARCHAR2(2), 
	IDCONTAPROV           VARCHAR2(10), 
	IDSTATUSCONT          VARCHAR2(30), 
	CDSISTEMA             VARCHAR2(8), 
	CDANOBI               VARCHAR2(4), 
	CDMESBI               VARCHAR2(2), 
	BIFATCOM              VARCHAR2(6), 
	TRFATCOM              VARCHAR2(6), 
	SEFATCOM              VARCHAR2(6), 
	CDOPEREVOL            VARCHAR2(12), 
	CDMOTIEVOCON          VARCHAR2(5), 
	NMCONTATO             VARCHAR2(100), 
	CDPAIS                VARCHAR2(4), 
	SGESTADO              VARCHAR2(6), 
	CDMUNICIPIO           VARCHAR2(10), 
	CDPROCOMERCI          VARCHAR2(10), 
	DSTPCONTATO           VARCHAR2(30), 
	CDMTENCECONT          VARCHAR2(5) ,
        NRORG                 FLOAT DEFAULT 1 NOT NULL
   )
   
/
CREATE INDEX TEK013 ON ETLCOMERCIALMENSAL (CDFILIAL )
/
ALTER TABLE ETLCOMERCIALMENSAL
    ADD CONSTRAINT TEK013FILIAL FOREIGN KEY  (CDFILIAL)
       REFERENCES FILIAL (CDFILIAL)
/
CREATE INDEX TEK014 ON ETLCOMERCIALMENSAL (CDMOTIEVOCON )
/
ALTER TABLE ETLCOMERCIALMENSAL
    ADD CONSTRAINT TEK014MOTIEVOLCONT FOREIGN KEY  (CDMOTIEVOCON)
       REFERENCES MOTIEVOLCONT (CDMOTIEVOCON)
/
CREATE INDEX TEK015 ON ETLCOMERCIALMENSAL (CDPAIS )
/
ALTER TABLE ETLCOMERCIALMENSAL
    ADD CONSTRAINT TEK015PAIS FOREIGN KEY  (CDPAIS)
       REFERENCES PAIS (CDPAIS)
/
CREATE INDEX TEK017 ON ETLCOMERCIALMENSAL (CDANOBI )
/
ALTER TABLE ETLCOMERCIALMENSAL
    ADD CONSTRAINT TEK017ETLANOBI FOREIGN KEY  (CDANOBI)
       REFERENCES ETLANOBI (CDANOBI)
/
CREATE INDEX TEK018 ON ETLCOMERCIALMENSAL (CDMESBI )
/
ALTER TABLE ETLCOMERCIALMENSAL
    ADD CONSTRAINT TEK018ETLMESBI FOREIGN KEY  (CDMESBI)
       REFERENCES ETLMESBI (CDMESBI)
/
CREATE INDEX TEK019 ON ETLCOMERCIALMENSAL (CDSISTEMA )
/
ALTER TABLE ETLCOMERCIALMENSAL
    ADD CONSTRAINT TEK019SISPLAT FOREIGN KEY  (CDSISTEMA)
       REFERENCES SISTEMA (CDSISTEMA)
/
CREATE INDEX TEK020 ON ETLCOMERCIALMENSAL (CDMOTICONT )
/
ALTER TABLE ETLCOMERCIALMENSAL
    ADD CONSTRAINT TEK020MOTICONT FOREIGN KEY  (CDMOTICONT)
       REFERENCES MOTICONT (CDMOTICONT)
/
CREATE INDEX TEK022 ON ETLCOMERCIALMENSAL (CDPROCOMERCI )
/
ALTER TABLE ETLCOMERCIALMENSAL
    ADD CONSTRAINT TEK022PROCOMERCI FOREIGN KEY  (CDPROCOMERCI)
       REFERENCES PROCOMERCI (CDPROCOMERCI)
/