時(shí)間:2024-02-28 13:28作者:下載吧人氣:36
在 mysql 中,實(shí)現(xiàn) id 自增的方式是依靠加一個(gè) auto_increment 標(biāo)志,而在 pgsql 中,id 自增是通過(guò)序列 SEQUENCE。
創(chuàng)建表時(shí)設(shè)置自增序列為:
CREATE TABLE “config” (
“id” int4 NOT NULL DEFAULT nextval(‘config_id_seq’::regclass),
…
};
網(wǎng)友評(píng)論