美文网首页
postgre 自增列

postgre 自增列

作者: DH东海 | 来源:发表于2021-05-29 15:41 被阅读0次

select * from pmsystem.acceptance
select MAX(acceptance_id ) from pmsystem.acceptance

CREATE SEQUENCE pmsystem.acceptance_acceptance_id_seq
INCREMENT 1
START 10319
MINVALUE 1
MAXVALUE 9223372036854775807
CACHE 1;
ALTER SEQUENCE pmsystem.acceptance_acceptance_id_seq
OWNER TO postgres;

ALTER table pmsystem.acceptance alter column acceptance_id set DEFAULT nextval('pmsystem.acceptance_acceptance_id_seq');

相关文章

网友评论

      本文标题:postgre 自增列

      本文链接:https://www.haomeiwen.com/subject/fxoysltx.html