【postgresql】创建自增SEQUENCE

CREATE SEQUENCE circlefence_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;


alter table circlefence alter column id set default nextval('circlefence_id_seq');

posted on 2015-09-08 20:38  viewcozy  阅读(484)  评论(0编辑  收藏  举报