Re: SERIAL data type
Posted in 1995
Topics: Data Types & Schema Design
>........................................I do an alter table where >the only thing changed is the starting value of the serial field. When I altered the serial field to change the starting value IT DID NOT change it. The next INSERT was +1 from the last INSERT. I deleted all the rows, so it doesn't use MAX(serial column+1) to figure it out. It must keep the value internally. Besides, if it did this, it wouldn't roll over to 1. (I tested this using Informix 6.00.UE1.) So, if it does keep the value internally, why doesn't it reset with the ALTER TABLE MODIFY (col01 SERIAL(300))? Beats me. I would just be cautious about your application and test things you're not sure about. Testing some of this stuff on Informix woke me up to a number of things. And thanks for the corrections. I've learned a few things along the way. (Not that that is difficult for me to do. ;-) ) ...don donald_boothby_at_isdlan@ima.isd.state.in.us >You never need to change the field to integer or drop and recreate the index. > >Cheers - Jim > >-- >---------------------------------------------------------------- >Jim Gordon DHL Airways Inc. jgordon@us.dhl.com >----------------------------------------------------------------