Subject Re: [firebird-support] generators
Author Jerome Bouvattier
Luiz,

> Dear Friends
>
> How to get the last value generated by an generator
>
> Database name Teste2
> Generator name G_SRSR_RECNO that is used along with an trigger for an
> autoincrement field;

Use Gen_id as you do in your trigger but with 0 as the increment.

Select gen_id(G_SRSR_RECNO, 0) from rdb$database

Keep in mind the result is purely informative. You should not rely on it
since it may turn wrong as soon as you retrieved it.

Regards.

--
Jerome