SET TERM ^ ;



CREATE OR ALTER TRIGGER PROCESSOS_MINERAR_USUARIO FOR PROCESSOS_MINERAR
ACTIVE BEFORE INSERT POSITION 1
AS
DECLARE VARIABLE I_TEMP INTEGER;
BEGIN
    SELECT COD_USUARIO 
    FROM FUNCAO_COD_USUARIO 
    INTO :I_TEMP;

    NEW.COD_USUARIO = :I_TEMP;
END
^

SET TERM ; ^