Possible to condense primary key/serial?

前端 未结 4 1168
挽巷
挽巷 2021-01-21 19:56

I have a database where everything is linked with foreign keys, so the Postgres knows exactly how the database is layed out..

Well, Lets say I have Table1 and Table2.

4条回答
  •  长发绾君心
    2021-01-21 20:25

    It's best if a primary key never changes: Renumbering them is a PITA.

    If you need an ID for humans, one that has no gaps, A. Elein Mustain shows how to create a gapless sequence.

提交回复
热议问题