Home Page for the TeradataForum
 
 

 

Archives of the TeradataForum





Message Posted: Tue, 30 Dec 2003 @ 07:48:46 GMT





     
  <Prev Next>  
<<First
<Prev
Next> Last>>  




Subj:   Identity Column Crisis
 
From:   Shabahat Ali Shah



I have defined a table column as Identity Column with the following syntax.

serial_no INTEGER GENERATED ALWAYS AS  IDENTITY
(
start with 1
increment by 1
maxvalue 2147483547
no cycle
)

PROBLEM:

Problem is that when I insert in the table containing the identity column, the serial numbers generated by the system are not in the sequence I mentioned in the syntax. e.g. I inserted 1000 rows in the table but the corresponding serial numbers generated by the system are somewhat like this....

1, 2, 3, 4, 5, 6, 7, 8, 9 ... 21, 100001, 100002, 100003, 100004, ... 100021, 200001, 200002, 200003, ... 2000019, 300001, 300002, ...


and it goes on until 1000 sequence numbers.

Can somebody explain why is this happening. Obviously i expect the numbers to be generated in a normal ascending order...like ..

1, 2, 3, 4,... 1000.


Plz help.

Shabahat.





     
  <Prev Next>  
<<First
<Prev
Next> Last>>  
 
 
 
 
 
 
 
 
  
 
  Top Home Join Privacy Feedback  
 
 
Copyright for the TeradataForum (TDATA-L), Manta BlueSky 
Last Modified: 30 Jun 2008