postgres 设置自增字段

设置字段的数据类型为serial

create table test_searial(id serial,id2 serial2);

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

``
posted @ 2020-07-20 19:15  那时一个人  阅读(2142)  评论(0编辑  收藏  举报