
  CREATE TABLE "STDT_TENANTS" 
   (	"TENANT_ID" NUMBER(15,0) NOT NULL ENABLE, 
	"TENANT_NAME" VARCHAR2(240) NOT NULL ENABLE, 
	"TENANT_DESCRIPTION" VARCHAR2(2000), 
	"EFFECTIVE_FROM_DATE" DATE, 
	"EFFECTIVE_TO_DATE" DATE, 
	"CREATED_BY" VARCHAR2(150) NOT NULL ENABLE, 
	"CREATION_DATE" TIMESTAMP (6) WITH LOCAL TIME ZONE NOT NULL ENABLE, 
	"LAST_UPDATED_BY" VARCHAR2(150) NOT NULL ENABLE, 
	"LAST_UPDATE_DATE" TIMESTAMP (6) WITH LOCAL TIME ZONE NOT NULL ENABLE, 
	 CONSTRAINT "STDT_TENANTS_PK" PRIMARY KEY ("TENANT_ID")
  USING INDEX  ENABLE
   ) ;

  CREATE OR REPLACE EDITIONABLE TRIGGER "BI_STDT_TENANTS" 
  before insert on "STDT_TENANTS"               
  for each row  
begin   
  if :NEW."TENANT_ID" is null then 
    select "STDT_TENANTS_SEQ".nextval into :NEW."TENANT_ID" from sys.dual; 
  end if; 
end; 

/
ALTER TRIGGER "BI_STDT_TENANTS" ENABLE;