CREATE TABLE UPDATERVERSAO (	
    IDUPDATERVERSAO   NUMBER NOT NULL,
    IDUPDATERSISTEMAS NUMBER NOT NULL,
    CDOPERADOR        VARCHAR2(12) NOT NULL,
    UPVERDATA         DATE NOT NULL,
    UPVERSTATUS       NUMBER NOT NULL,
    CONSTRAINT PK_UPDATERVERSAO PRIMARY KEY (IDUPDATERVERSAO)
)
/
CREATE SEQUENCE SEQ_UPDATERVERSAO START WITH 1 MINVALUE 1 INCREMENT BY 1
/
CREATE OR REPLACE TRIGGER GERA_ID_UPDATERVERSAO 
BEFORE INSERT ON UPDATERVERSAO FOR EACH ROW
BEGIN
  SELECT SEQ_UPDATERVERSAO.NEXTVAL
    INTO :NEW.IDUPDATERVERSAO
    FROM DUAL;
END;