Subject Re: [firebird-support] Re: A bit strange GEN_ID result
Author Martijn Tonies
> Yesssssss it's true!!
>
> This procedure works as I can expect:
>
> CREATE PROCEDURE NEW_PROCEDURE
> AS
> declare variable var integer;
> BEGIN
> select gen_id("Table1_ID_GEN", 1 ) from rdb$database INTO :var;

Or use:

var = gen_id("Table1_ID_GEN", 1);

With regards,

Martijn Tonies
Database Workbench - developer tool for InterBase, Firebird, MySQL & MS SQL
Server.
Upscene Productions
http://www.upscene.com