postgres 设置自增字段

设置字段的数据类型为serial

create table test_searial(id serial,id2 serial2);

-- 查看自增的设置:
SELECT c.relname FROM pg_class c WHERE c.relkind = 'S';

``
原文地址:https://www.cnblogs.com/qianxunman/p/13347181.html