1,如何实现id自增长?
在mysql,中使用"id int primary auto_increment"即可实现。但是在postgresql中

drop table acount;
CREATE TABLE "public"."acount" (
"id" SERIAL primary key,  
"acount_name" varchar(6) COLLATE "default" NOT NULL,
"county_money" varchar(50) COLLATE "default" NOT NULL
)
WITH (OIDS=FALSE)
;

ALTER TABLE "public"."acount" OWNER TO "postgres";

insert into acount(acount_name,county_money) values('zhouyi','10000')

成功截图:
postgresql

相关文章:

  • 2021-06-27
  • 2021-12-03
猜你喜欢
  • 2021-06-05
  • 2022-12-23
  • 2022-01-10
  • 2021-11-29
相关资源
相似解决方案