user13281540 wrote:What database version ?
I have this situation where sometimes the primary key is missing or jumps sequence during record saving. It happens occasionally but I do not know when and how it happens.
The primary key is generated automatically by sequence. For example, last month after the primary key 351 is being saved into table CUSTOMER, the next record is using primary key number 400.
Earlier this week, the situation happened again. Primary key 904 was recorded into CUSTOMER table. But, the next primary key was 950. I do not know where are primary keys from 905 until 949 went missing.
I hope anyone could show me how to rectify this.
user13281540 wrote:OK, no cache.
The database version is Oracle Database 11g Enterprise Edition Release 22.214.171.124.0 - 64bit Production
I am not sure whether it is RAC or others.
This is the syntax
CREATE SEQUENCE "CLIENT"."SEQ_CUSTOMER_ID" MINVALUE 1 MAXVALUE 9999999999999999999999999999 INCREMENT BY 1 START WITH 13154 NOCACHE ORDER CYCLE ;