I’ve to make some PHP interaction with an Ingres database. I need to get the ID of the last entry I inserted in the database.
How should I proceed? I’m not an ingres expert, but I suppose there is also auto-incremented ID/Sequences/…?
Thank you very much
The
last_identity()function will give you the last generated sequence number for a table, e.g.:From what I understand the sequence number needs to be created, using
CREATE TABLEusing the following syntax:e.g.:
See http://community.ingres.com/wiki/Using_Ingres_Identity_Columns for some additional notes on using identity columns.