Sequence.nextval can really deceive you !!
Yes, they really can. Yesterday, I noticed that one of the sequence number (pol_no_seq) in our IH application was giving different set of results when accessed (pol_no_seq.nextval) from two different machines. When I shared this observation with colleagues, the feedback was something like "It does not make sense" and frankly speaking, even I thought the same :-) But, how could I ignore what I actually saw with my own eyes ? I was really puzzled. Given below is the explanation of what and why it happenned, based on my findings from some forums: Definition of pol_no_seq : CREATED 25-JAN-07 LAST_DDL_TIME 25-JAN-07 SEQUENCE_OWNER INSURANCE SEQUENCE_NAME POL_NO_SEQ MIN_VALUE 1 MAX_VALUE 1000000000000000000000000000 INCREMENT_BY 1 CYCLE_FLAG N ORDER_FLAG N CACHE_SIZE 200 LAST_NUMBER 2802765 Results : Machine A : pol_no_seq.nextval->28000146 Machine A : pol_no_seq.nextval->28000147 Machine B : pol_no_seq.nextval->28000412 Machine ...