SERIAL data type (correction)
Posted in 1995
Topics: Data Types & Schema Design
On Jun 22, 7:56pm, DONALD BOOTHBY wrote: + Subject: Re: SERIAL data type + >........................................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. / Donald, / I ran the following test on Online 7.10.UC2. <clipped> / Results were: <clipped> / as expected. I no longer have access to V6 so if this does not work / on V6 please report it both to Informix and the net. / Thanks - Jim Jim (et al), I erred! I typed in your test as well as re-typed in my original test and all results agreed with the expected output. I guess I forgot to hit 'enter' or something. (But officer, I could have sworn.... :) ) Thanks for pointing out my error (and so graciously, too.) ...don