CREATE TABLE UPDATERSISTEMAS (	
    IDUPDATERSISTEMAS  NUMBER NOT NULL,
    DEVOPSID           NUMBER NOT NULL,
    SISTEMASSTATUS     NUMBER NOT NULL,
    CDFILIAL           VARCHAR2(4) NOT NULL,
	  APLICACAO          VARCHAR2(100),
	  SERVICO            VARCHAR2(100),
    UPSISVERATUAL      VARCHAR2(50),
    DIRETORIO          VARCHAR2(1000),
    CONSTRAINT PK_UPDATERSISTEMAS PRIMARY KEY (IDUPDATERSISTEMAS)
)
/
CREATE SEQUENCE SEQ_UPDATERSISTEMAS START WITH 1 MINVALUE 1 INCREMENT BY 1
/
CREATE OR REPLACE TRIGGER GERA_ID_UPDATERSISTEMAS 
BEFORE INSERT ON UPDATERSISTEMAS FOR EACH ROW
BEGIN
  SELECT SEQ_UPDATERSISTEMAS.NEXTVAL
    INTO :NEW.IDUPDATERSISTEMAS
    FROM DUAL;
END;