SET TERM ^ ;

CREATE OR ALTER trigger ttbpower_bi_painel_usuario_b01i for tbpower_bi_painel_usuario
active before insert position 0
AS
BEGIN
    IF (COALESCE(NEW.ID, 0) = 0) THEN
        NEW.ID = GEN_ID(GTBPOWER_BI_PAINEL_USUARIO, 1);
END
^

SET TERM ; ^

