View previous topic :: View next topic
|
Author |
Message |
Roshnii
New User
Joined: 30 Sep 2008 Posts: 45 Location: bangalore
|
|
|
|
I have a requirement for generating unique numbers and I am using DB2 sequence object.
My sequence object is defined like this:
Code: |
CREATE SEQUENCE MYSEQUENCE
AS DECIMAL(18)
START WITH 1
INCREMENT BY 1
MINVALUE 1
MAXVALUE 999999999999999999
NO CYCLE
NO CACHE
ORDER
|
Now my question is what happens when two different processes
request for this sequence number?
Is there a possiblility that DB2 will generate the same number?
In that case there can be an error of duplicate rows as this sequence number will be used to insert in a table as the key. |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
Back to top |
|
|
Roshnii
New User
Joined: 30 Sep 2008 Posts: 45 Location: bangalore
|
|
|
|
thanks. I will go thru it |
|
Back to top |
|
|
|