CREATE OR REPLACE TRIGGER "KLUBY_T2" BEFORE insert or update or delete on "KLUBY" for each row begin if :NEW.ID_KLUBU is null then :NEW.ID_KLUBU := KLUBY_SEQ.nextval; end if; end; / ALTER TRIGGER "KLUBY_T2" ENABLE /