Re: SERIAL data type
Posted in 1995
>From: cwakins@leia.alloys.rmc.com (Clem Akins) >Newsgroups: comp.databases.informix >Subject: SERIAL data type >Date: 21 Jun 1995 18:13:03 -0400 > >> Does anyone if their is a mechanism or workaround to get the SERIAL >> datatype to wrap back to 1 (or some other value) when it reaches its >> maximum (2147483647) >> >> I'm working with Informix 5.0 and will be moving to 6.0 and 7.0 >> >> Thanks >> >> -------------------------------------------------------------------------- ---- > > Enda Finnan, Telephone: +353 1 676 9089 > > Software and Systems Engineering Limited (SSE) Telfax: +353 1 676 7984 > > Fitzwilliam Court, Leeson Close, Email: enda.finnan@ sse.ie > > Dublin 2, X.400: /G=Enda/S=Finnan/O=SSE/P=SSE/A=EIRMAIL400/C= IE/ > > Ireland. >> -------------------------------------------------------------------------- ---- > >Serial values will automatically wrap around to an unused value, presumably >1 when they exceed the max. There is no easy way to insert specific values >into serial columns. (There is some way to unload and load values, I think, >but I have forgotten what that is.) > >Been to Eire, and missing it a lot... > __________________________________________________________________ > | Clem Akins Standard Disclaimers Apply | > |Reynolds Metals Co, Alloys Plant "Climb High, Cave Deep!" | > | Muscle Shoals, Alabama USA cwakins@leia.alloys.rmc.com | > |________________________________________________________________| There is a way to insert specific values, but it's not easy. 1. Alter table from serial to integer. 2. Drop the index. 3. Insert values. 4. Create unique index. 5. Change type from integer back to serial. Specify new starting above the last number you entered. I've done this a couple of times. nb: Do you backups first, and make sure they are readable! Jeff Cauhape