How to get the ID of the data after the insert into
huawan2018 opened this issue · 1 comments
huawan2018 commented
How to get the ID of the data after the insert into
CamiloGarciaLaRotta commented
For anyone wondering, I had the same question:
If you are using Postgres you can add a RETURNING <field>
statement at the end of your INSERT
.
Then you can query back the DB with the returned field (e.g. id)