We love hearing from our users. Tell us what you want to see next and upvote ideas from the community. * Bugs and troubleshooting should as usual go through InterSystems support.
We have considered adding support for a RETURNING clause to our SQL INSERT command, but despite the apparent simplicity, it requires significant changes across our drivers and as such it hasn't drifted up to the top of our priority list.
We have considered adding support for a RETURNING clause to our SQL INSERT command, but despite the apparent simplicity, it requires significant changes across our drivers and as such it hasn't drifted up to the top of our priority list.
Note that in IRIS JDBC, this information is available using the standard getGeneratedKeys() method: https://docs.intersystems.com/iris20233/csp/docbook/Doc.View.cls?KEY=BJAVA_primer#BJAVA_primer_resultsets_insert
@Stefan Cronje, you have a comment on your idea. Please answer it to help your idea to be promoted.
Depending on how you are running SQL, you can access a special variable called %ROWID.
Via SQL there is a LAST_IDENTITY() function.
Examples of both here...
https://docs.intersystems.com/irislatest/csp/docbook/DocBook.UI.Page.cls?KEY=RSQL_last_identity