ALTER TABLE PARAMGERAL ADD CDTPOPREMSAID VARCHAR2(02)
/

ALTER TABLE PARAMGERAL ADD CDTPOPREMENTR VARCHAR2(02)
/

ALTER TABLE PARAMGERAL ADD CDTPOPRETSAID VARCHAR2(02)
/

ALTER TABLE PARAMGERAL ADD CDTPOPRETENTR VARCHAR2(02)

/

ALTER TABLE PARAMGERAL ADD IDNFREMRETAUTO VARCHAR2(01) DEFAULT 'N'
/


CREATE TABLE TIPOOPERREMRET
(CDTIPOOPER   VARCHAR2(02) NOT NULL,
 IDENTRSAIDOP VARCHAR2(01) NOT NULL,
 IDENTRREMRET VARCHAR2(01) NOT NULL,
 CONSTRAINT PK_TIPOOPERREMRET PRIMARY KEY (CDTIPOOPER, IDENTRSAIDOP, IDENTRREMRET)
)
/


ALTER TABLE TIPOOPERREMRET
    ADD CONSTRAINT FK_TIPOOPERREMRET  FOREIGN KEY  (CDTIPOOPER, IDENTRSAIDOP)
       REFERENCES TIPOOPERAC (CDTIPOOPER, IDENTRSAIDOP)
/