
  CREATE TABLE "STDT_TERMS" 
   (	"TERM_ID" NUMBER(15,0) NOT NULL ENABLE, 
	"STUDENT_ID" NUMBER(15,0) NOT NULL ENABLE, 
	"TERM_NAME" VARCHAR2(240) NOT NULL ENABLE, 
	"TERM_START_DATE" DATE NOT NULL ENABLE, 
	"TERM_END_DATE" DATE NOT NULL ENABLE, 
	"CREATED_BY" VARCHAR2(150) NOT NULL ENABLE, 
	"CREATION_DATE" TIMESTAMP (6) NOT NULL ENABLE, 
	"LAST_UPDATED_BY" VARCHAR2(150) NOT NULL ENABLE, 
	"LAST_UPDATE_DATE" TIMESTAMP (6) NOT NULL ENABLE, 
	"TENANT_ID" NUMBER, 
	 CONSTRAINT "STDT_TERMS_PK" PRIMARY KEY ("TERM_ID")
  USING INDEX  ENABLE
   ) ;

  CREATE OR REPLACE EDITIONABLE TRIGGER "BI_STDT_TERMS" 
  before insert on "STDT_TERMS"               
  for each row  
begin   
  if :NEW."TERM_ID" is null then 
    select "STDT_TERMS_SEQ".nextval into :NEW."TERM_ID" from sys.dual; 
  end if; 
end; 

/
ALTER TRIGGER "BI_STDT_TERMS" ENABLE;