Subject | Re: [firebird-support] Get Gen_ID value used in last INSERT INTO |
---|---|
Author | Bogusław Brandys |
Post date | 2004-10-31T09:43:18Z |
Diego Barros wrote:
Regards
Bogusław Brandys
>This is commonly used I suppose.
> When I insert a new row into a table, and one of the field's uses a
> generator, how can I get that value of that generated field? Do I need
> to write a stored procedure to do this? Something like:
>
> ID = GEN_ID('xx', 1);
> INSERT INTO Table... (using ID)
> return ID
> Or is there something along the lines of SQL Server's "SELECTNot the one I know.Probably such special SQL notexists for Firebird.
> @@IDENTITY"?
Regards
Bogusław Brandys