问题
I am quite very new to postgreSQL. I am have a sequence which starts from 1 by default. What I am looking for is that if I want to move my next value, which is now 87, to 2000. I am unable to do that. Can any one suggest me how to go about doing the change?
回答1:
You can ALTER the sequence using the following code:
ALTER SEQUENCE seq_name RESTART 2000.
I request you to please go through the postgres SQL manuals.
http://www.postgresql.org/docs/current/static/sql-altersequence.html
来源:https://stackoverflow.com/questions/26037186/alter-postgresql-sequence