This is the first time that I am using the IDENTITY Column in my table.
We have defined Column as GENERATED ALWAYS and also have a unique index
defined on it.
We are populating the table through LOAD utility. Of course while
LOADing we are NOT providing values for the IDENTITY Column. Till this
point its fine. We had given START WITH 1 and INCREMENT with 1 and
values were inserted fine. The problem started when I manually inserted
a row into the table. The value generated by DB2 was not the immediate
successor of the maximum value present in that column. There was a huge
gap in it. Say if the last value was 25, DB2 generated 1001 this time.
The successive inserts yielded 1002, 1003...
Can someone explain this behavior and what I can do if I want continuous
values.
Is there is a possibility of a gap even now when I am inserting
manually.
We are on db2 v7.1 for z/os
Thanks & Regards,
Divakar
The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments.
WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email.
www.wipro.com
DB2 & UDB email list listserv db2-l LazyDBA home page