問題:
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