Postgresql 更改序列自增开始值 备忘

db_tst=# begin;
BEGIN
adchap_tst=# ALTER SEQUENCE fb_fy_user_id_seq RESTART WITH 7876;
ALTER SEQUENCE
db_tst=# select nextval('fb_fy_user_id_seq');
 nextval
---------
    7876
(1 row)

db_tst=# commit;

你可能感兴趣的:(java,PostgreSQL)