1. 创建序列
create sequence table_name_id_seq start with 1 increment by 1 no minvalue no maxvalue cache 1;
2. 设置表的ID字段的默认值为nextval(table_name_id_seq)
alter table bbb alter column id set default nextval('table_name_id_seq');