Anyone knows how to retrieve a new AutoInc that gets written after an ODBC INSERT? Is there a variable I have access to just like SQL Server? Right now, I'm using :
SELECT MAX(myautoincfield) AS mylastkey FROM anytable
in order to retrieve my new key.
The scalar function LastAutoinc can retrieve it efficiently:
select LastAutoinc(statement) as mylastkey from system.iota;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With