跳到主要内容

PG常用SQL

设置序列起始点

CREATE TABLE example (
id SERIAL PRIMARY KEY,
name TEXT
);

-- 修改序列的起始值
ALTER SEQUENCE example_id_seq RESTART WITH 1000;