text: /* Formatted on 10/6/2014 6:20:11 PM (QP5 v5.126.903.23003) */
  CREATE TABLE ACA.ACA_CLASSES_N_THR_CRSES (
     CLSS_CRSE_ID       NUMBER NOT NULL,
     CLASS_ID           NUMBER,
     COURSE_ID          NUMBER,
     IS_ENABLED         VARCHAR (1 BYTE),
     CREATED_BY         NUMBER NOT NULL,
     CREATION_DATE      VARCHAR (21 BYTE) NOT NULL,
     LAST_UPDATE_BY     NUMBER NOT NULL,
     LAST_UPDATE_DATE   VARCHAR (21 BYTE) 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 ACA.IDX_CLSS_CRSE_ID
     ON ACA.ACA_CLASSES_N_THR_CRSES (CLSS_CRSE_ID)
     LOGGING
     TABLESPACE RHODB
     PCTFREE 10
     INITRANS 2
     MAXTRANS 255
     STORAGE (PCTINCREASE 0 BUFFER_POOL DEFAULT)
     NOPARALLEL;
  
  ALTER TABLE ACA.ACA_CLASSES_N_THR_CRSES ADD (
    CONSTRAINT PK_CLSS_CRSE_ID
   PRIMARY KEY
   (CLSS_CRSE_ID));
  
  CREATE SEQUENCE ACA.ACA_CLASSES_N_THR_CRSES_SEQ
     START WITH 1
     MAXVALUE 9223372036854775807
     MINVALUE 1
     NOCYCLE
     CACHE 20
     ORDER;
  
  CREATE OR REPLACE TRIGGER ACA.ACA_CLASSES_N_THR_CRSES_TRG
     BEFORE INSERT
     ON ACA.ACA_CLASSES_N_THR_CRSES
     FOR EACH ROW
     -- OPTIONALLY RESTRICT THIS TRIGGER TO FIRE ONLY WHEN REALLY NEEDED
     WHEN (NEW.CLSS_CRSE_ID IS NULL)
  DECLARE
     V_ID   ACA.ACA_CLASSES_N_THR_CRSES.CLSS_CRSE_ID%TYPE;
  BEGIN
     SELECT   ACA.ACA_CLASSES_N_THR_CRSES_SEQ.NEXTVAL INTO V_ID FROM DUAL;
  
     :NEW.CLSS_CRSE_ID := V_ID;
  END ACA_CLASSES_N_THR_CRSES;