--建一个序列
create sequence id_seq increment 1 minvalue 1 maxvalue 9223372036854775807  cache 1;--

缓存是1,每次增加1
select setval('id_seq',1);--从1开始
--建表
create table buyers(
id int not null primary key default nextval('id_seq'),
name varchar(30)
)

相关文章:

  • 2022-12-23
  • 2021-10-19
  • 2022-12-23
  • 2022-03-09
  • 2022-01-02
  • 2022-01-31
  • 2021-12-04
  • 2021-12-09
猜你喜欢
  • 2022-12-23
  • 2022-03-07
  • 2022-12-23
  • 2021-11-21
  • 2021-12-22
  • 2022-12-23
相关资源
相似解决方案