
  CREATE TABLE "STDT_EXAM_RESULTS" 
   (	"RESULT_ID" NUMBER(15,0) NOT NULL ENABLE, 
	"STUDENT_ID" NUMBER(15,0) NOT NULL ENABLE, 
	"TERM_ID" NUMBER(15,0) NOT NULL ENABLE, 
	"SUBJECT_ID" NUMBER(15,0) NOT NULL ENABLE, 
	"LEVEL_ID" NUMBER(15,0) NOT NULL ENABLE, 
	"RESULT_DATE" DATE NOT NULL ENABLE, 
	"RESULT" NUMBER(15,0) NOT NULL ENABLE, 
	"RANK" VARCHAR2(1), 
	"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, 
	"DESCRIPTION" VARCHAR2(240) NOT NULL ENABLE, 
	"TENANT_ID" NUMBER, 
	 CONSTRAINT "STDT_EXAM_RESULTS_PK" PRIMARY KEY ("RESULT_ID")
  USING INDEX  ENABLE
   ) ;

  CREATE OR REPLACE EDITIONABLE TRIGGER "BI_STDT_EXAM_RESULTS" 
  before insert on "STDT_EXAM_RESULTS"               
  for each row  
begin   
  if :NEW."RESULT_ID" is null then 
    select "STDT_EXAM_RESULTS_SEQ".nextval into :NEW."RESULT_ID" from sys.dual; 
  end if; 
end; 

/
ALTER TRIGGER "BI_STDT_EXAM_RESULTS" ENABLE;