Have an idea, suggestion, or something that doesn’t work as expected in InterSystems products or services? Share it here on the InterSystems Ideas Portal.
The Ideas Portal is where community members can propose improvements, report bugs, and help influence the product roadmap across InterSystems products and the overall developer experience. 22% of submitted ideas are implemented by InterSystems or members of the Developer Community.
💡 Ideas and bugs are both welcome, no matter how big or small. You can submit feature requests, usability improvements, workflow suggestions, and bug reports. Whether you’re an experienced expert or just getting started, your fresh perspective is valuable.
🛠️ About bugs and fixes. If you have access to InterSystems WRC, please submit bugs there for immediate action. Bug reports submitted through the Ideas Portal are reviewed and tracked, but do not guarantee immediate resolution.
Start by sharing what could be better - the community and our teams will help take it from there.
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