表atable(id,a) id需要自增 首先建立一个序列:
create sequence seq_atable minvalue 1 maxvalue 999999999999999999 start with 1 increment by 1 nocache

 

仅使用序列,需要在插入数据时,自增字段插入序列下一个值

如:insert into atable(id,a) values(seq_atable.nextval,'test');

相关文章:

  • 2022-12-23
  • 2022-01-23
  • 2021-07-26
  • 2021-10-07
  • 2022-02-01
  • 2021-12-24
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-08-03
  • 2022-12-23
  • 2022-02-24
  • 2021-11-27
  • 2021-10-17
相关资源
相似解决方案