Hi there, I am connecting to a Redshift DB and after an insert statement I would like to return the associated auto-incremented ID. From other posts there seems to be a function called RETURNING
that can do this (see attached example) - however when I add the RETURNING
function I get a syntax error. I am thinking this is an easy fix that I am just not seeing. Any suggestions would be a great help.
Hey @LisaT! Doing some digging, it seems as though the RETURNING
keyword is not support by AWS Redshift, other folks have been asking similar questions on other platforms (example 1, example 2).
It's possible to use the workaround from the first example in Retool, however, by running a separate query as a success handler to your insert query - could that work?
Thanks @Kabirdas -- I didn't think to check if it was a Redshift issue, thanks for that. I have gone with example 1 as suggested. Thanks so much for your feedback.