CREATE TABLE USR_PARAMINTEGRA 
(
   CDFORNECED 		VARCHAR2(21),
   DSDIRENVIO 		VARCHAR2(250),  
   DSHOST 		VARCHAR2(100), 
   DSLOGIN 		VARCHAR2(50), 
   DSSENHA 		VARCHAR2(20), 
   CDOPERADOR 		VARCHAR2(12),
   NRORG                 	NUMBER 		DEFAULT 	 SYS_CONTEXT('nrorg_ctx','nrorg') NOT NULL,
   IDATIVO                	VARCHAR2(1)     	DEFAULT 'S' NOT NULL
	CONSTRAINT CKC_IDATIVO_USR_PARAMINT CHECK (IDATIVO IN ('S','N')),
   DTINCLUSAO        	DATE                   	NULL,
   DTULTATU                  	DATE                  	NULL,
   NRORGINCLUSAO      	NUMBER             	DEFAULT 1 NULL,
   CDOPERINCLUSAO    	VARCHAR2(12)  	DEFAULT '1' NULL,
   NRORGULTATU          	NUMBER             	DEFAULT 1 NULL,
   CDOPERULTATU        	VARCHAR2(12)  	DEFAULT '1',
   VRINTERVALO 		FLOAT,
	CONSTRAINT PK_USR_PARAMINTEGRA PRIMARY KEY (CDFORNECED)
)
/
ALTER TABLE USR_PARAMINTEGRA ADD 
	CONSTRAINT FKPLA01158FORNECEDOR FOREIGN KEY (CDFORNECED) 
		REFERENCES FORNECEDOR(CDFORNECED)
/
CREATE INDEX  PLA01159_FK ON USR_PARAMINTEGRA (CDOPERADOR ASC)
/
ALTER TABLE USR_PARAMINTEGRA ADD 
	CONSTRAINT FKPLA01159OPERADOR FOREIGN KEY (CDOPERADOR) 
		REFERENCES OPERADOR(CDOPERADOR)
/
ALTER TABLE USR_PARAMINTEGRA ADD DSCHAVEACESSO VARCHAR2(50)
/
ALTER TABLE PARAMINTEGRA ADD CDFORNECED VARCHAR2(21)
/
ALTER TABLE PARAMINTEGRA ADD 
	CONSTRAINT FKPLA01160FORNECEDOR FOREIGN KEY (CDFORNECED) 
		REFERENCES FORNECEDOR(CDFORNECED)
/
ALTER TABLE PARAMINTEGRA ADD DSDIRENVIO VARCHAR2(250)
/
ALTER TABLE PARAMINTEGRA ADD DSHOST VARCHAR2(100)
/
ALTER TABLE PARAMINTEGRA ADD DSLOGIN VARCHAR2(50)
/
ALTER TABLE PARAMINTEGRA ADD DSSENHA VARCHAR2(20)
/
ALTER TABLE PARAMINTEGRA ADD CDOPERADOR VARCHAR2(12)
/
ALTER TABLE PARAMINTEGRA ADD VRINTERVALO FLOAT