How can I automatically fix my Postgres sequence?

前端 未结 0 509
被撕碎了的回忆
被撕碎了的回忆 2021-01-06 11:31

I want to update a sequence in Postgres, which I can do semi-manually, like so:

SELECT MAX(id) as highest_id FROM users;
ALTER SEQUENCE users_id_seq RESTART W         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题