CREATE SEQUENCE GTBPREVISAO_VENDA_STATUS;

SET TERM ^ ;

create trigger ttbprevisao_venda_status_b01i for tbprevisao_venda_status
active before insert position 0
as
begin
  if (new.id is null) then
    new.id = gen_id(gtbprevisao_venda_status,1);
end
^

SET TERM ; ^