Subject | Get Gen_ID value used in last INSERT INTO |
---|---|
Author | Diego Barros |
Post date | 2004-10-31T08:33:37Z |
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 "SELECT
@@IDENTITY"?
Cheers,
Diego
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 "SELECT
@@IDENTITY"?
Cheers,
Diego