問題:
I'm switching from MySQL to PostgreSQL and was wondering how I can do autoincrement values.我正在從 MySQL 切換到 PostgreSQL,並且想知道如何進行自動增量值。 I saw in the PostgreSQL docs a datatype "serial", but I get syntax errors when using it (in v8.0).我在 PostgreSQL 文檔中看到一個數據類型“串行”,但在使用它時出現語法錯誤(在 v8.0 中)。
解決方案:
參考一: https://stackoom.com/question/3IvC參考二: PostgreSQL Autoincrement