postgresql primary key id setting auto increment

Create an auto-incrementing sequence (start value must be greater than 0)

CREATE SEQUENCE standard_detail_id_seq START 1;

The primary key ID is set by default to

nextval('standard_detail_id_seq'::regclass)

{{o.name}}
{{m.name}}

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324130746&siteId=291194637