text: /* Formatted on 12-12-2018 1:33:29 PM (QP5 v5.126.903.23003) */
  DROP TABLE ALRT.ALRT_ALERTS;
  CREATE TABLE ALRT.ALRT_ALERTS (
     ALERT_ID                 NUMBER NOT NULL,
     ALERT_NAME               VARCHAR2 (200),
     ALERT_DESC               VARCHAR2 (300),
     TO_MAIL_NUM_LIST_MNL     CLOB,
     CC_MAIL_NUM_LIST_MNL     CLOB,
     ALERT_MSG_BODY_MNL       CLOB,
     ALERT_TYPE               VARCHAR2 (50),                         -- EMAIL...
     CREATED_BY               NUMBER NOT NULL,
     CREATION_DATE            VARCHAR2 (21) NOT NULL,
     LAST_UPDATE_BY           NUMBER NOT NULL,
     LAST_UPDATE_DATE         VARCHAR2 (21) NOT NULL,
     IS_ENABLED               VARCHAR2 (1),
     MSG_SBJCT_MNL            VARCHAR2 (200),
     BCC_MAIL_NUM_LIST_MNL    CLOB,
     PARAMTR_SETS_GNRTN_SQL   CLOB,
     REPORT_ID                NUMBER DEFAULT '-1' NOT NULL,
     SHD_RPT_BE_RUN           VARCHAR2 (1) DEFAULT '1' NOT NULL,
     START_DTE_TME            VARCHAR2 (21),
     REPEAT_UOM               VARCHAR2 (50),
     REPEAT_EVERY             NUMBER,
     RUN_AT_SPCFD_HOUR        VARCHAR2 (1) DEFAULT '0' NOT NULL,
     ATTCHMENT_URLS           CLOB,
     END_HOUR                 NUMBER DEFAULT '-1' NOT NULL
  )
  TABLESPACE RHODB
  PCTUSED 0
  PCTFREE 10
  INITRANS 1
  MAXTRANS 255
  STORAGE (PCTINCREASE 0 BUFFER_POOL DEFAULT)
  LOGGING
  NOCOMPRESS
  NOCACHE
  NOPARALLEL
  MONITORING;
  
  CREATE UNIQUE INDEX ALRT.IDX_ALERT_ID
     ON ALRT.ALRT_ALERTS (ALERT_ID)
     LOGGING
     TABLESPACE RHODB
     PCTFREE 10
     INITRANS 2
     MAXTRANS 255
     STORAGE (PCTINCREASE 0 BUFFER_POOL DEFAULT)
     NOPARALLEL;
  
  ALTER TABLE ALRT.ALRT_ALERTS ADD (
    CONSTRAINT PK_ALERT_ID
   PRIMARY KEY
   (ALERT_ID));
  
  DROP SEQUENCE ALRT.ALRT_ALERTS_SEQ;
  CREATE SEQUENCE ALRT.ALRT_ALERTS_SEQ
     START WITH 1
     MAXVALUE 9223372036854775807
     MINVALUE 1
     NOCYCLE
     NOCACHE
     ORDER;
  
  CREATE OR REPLACE TRIGGER ALRT.ALRT_ALERTS_TRG
     BEFORE INSERT
     ON ALRT.ALRT_ALERTS
     FOR EACH ROW
     -- OPTIONALLY RESTRICT THIS TRIGGER TO FIRE ONLY WHEN REALLY NEEDED
     WHEN (NEW.ALERT_ID IS NULL)
  DECLARE
     V_ID   ALRT.ALRT_ALERTS.ALERT_ID%TYPE;
  BEGIN
     SELECT   ALRT.ALRT_ALERTS_SEQ.NEXTVAL INTO V_ID FROM DUAL;
  
     :NEW.ALERT_ID := V_ID;
  END ALRT_ALERTS_TRG;
  