问题:
In PostgreSQL, how do I get the last id inserted into a table?在 PostgreSQL 中,如何将最后一个 id 插入到表中?
In MS SQL there is SCOPE_IDENTITY().在 MS SQL 中有 SCOPE_IDENTITY()。
Please do not advise me to use something like this:请不要建议我使用这样的东西:
select max(id) from table
解决方案:
参考一: https://stackoom.com/question/CLwf参考二: PostgreSQL function for last inserted ID