SET TERM ^ ;



CREATE OR ALTER TRIGGER PROCESSOS_MINERAR_LOTE_USUARIO FOR PROCESSOS_MINERAR_LOTES
ACTIVE BEFORE INSERT POSITION 2
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 ; ^