create or replace TRIGGER taskinfoit
BEFORE INSERT ON taskinfo
FOR EACH ROW

when (NEW.DBID IS NULL)
BEGIN
    SELECT taskinfois.NEXTVAL INTO:NEW.DBID FROM DUAL;
    END;