Returning ID instead of Data after Insert

After inserting data into the database, it's common practice to get the ID and then do something with that. However, currently all I can do is get the data (result), where I need to apply some additional filtering to get the actual ID.

Wouldn't it be nice if we could get the ID directly using a dedicated keyword/variable?

Please refer to the following screenshot for an example:
image

Let me know what you think! :wink:
:nerd_face:

2 Likes

Hi @emozio,

Thanks for the request! We have a feature request to return the primary keys of updated rows in Retool Database GUI mode queries. You can see how another user is a working around this limitation here: Get returning columns (mostly primary key) on bulk upserts with GUI queries

Was there another resource you had in mind?