CREATE TABLE USR_PARAMINTEGRA 
(CDFORNECED VARCHAR2(21),
 DSDIRENVIO VARCHAR2(250),  
 DSHOST VARCHAR2(100), 
 DSLOGIN VARCHAR2(50), 
 DSSENHA VARCHAR2(20), 
 CDOPERADOR VARCHAR2(12),
 VRINTERVALO FLOAT)
/
ALTER TABLE USR_PARAMINTEGRA ADD CONSTRAINT FK_USR_PARAMINTEGRA_FORNE001 FOREIGN KEY (CDFORNECED) REFERENCES FORNECEDOR(CDFORNECED)
/
ALTER TABLE USR_PARAMINTEGRA ADD CONSTRAINT PK_USR_PARAMINTEGRA PRIMARY KEY (CDFORNECED)
/
ALTER TABLE USR_PARAMINTEGRA ADD CONSTRAINT FK_USR_PARAMINTEGRA_OPER001 FOREIGN KEY (CDOPERADOR) REFERENCES OPERADOR(CDOPERADOR)
/
INSERT INTO USR_PARAMINTEGRA (CDFORNECED, DSDIRENVIO, DSHOST, DSLOGIN, DSSENHA, CDOPERADOR, VRINTERVALO)
SELECT CDFORNECED, DSDIRENVIO, DSHOST, DSLOGIN, DSSENHA, CDOPERADOR, VRINTERVALO
 FROM PARAMINTEGRA
/
COMMIT
/
-- VERSAO --
BEGIN ATUVEROBJ('ATUALIZACAO_ESTRUTURA_BD','5.60.061'); END;
/

