before insert on "CURSO" for each row begin if :NEW."COD_CUR" is null then select "CURSO_SEQ".nextval into :NEW."COD_CUR" from dual; end if; end; /
CREATE table "ESTUDIANTE" (
"DOC_EST" VARCHAR2(11), "NOM_EST" VARCHAR2(30), "APE_EST" VARCHAR2(30), "EDAD_EST" NUMBER ) /
alter table "ESTUDIANTE" add constraint "ESTUDIANTE_PK" primary key ("DOC_EST","EDAD_EST")
/
CREATE sequence "ESTUDIANTE_SEQ"
/
CREATE trigger "BI_ESTUDIANTE"
before insert on "ESTUDIANTE" for each row begin if :NEW."DOC_EST" is null then select "ESTUDIANTE_SEQ".nextval into :NEW."DOC_EST" from dual; end if; end; /