Re: Serial Fields
Posted in 1995
In article <4a6v6g$e89@fiesta.srl.ford.com> mreed "Mike Reed - Radiix" writes:
> jsturm@zenacomp.zenacomp.com (Jeff Sturm) wrote:
> >When a value is inserted into a serial column, Informix performs two checks:
> >
> > * If the column is zero, it is replaced with the next serial value
> > and the next serial value is incremented.
> >
> > * If the column is greater than the next serial value, the value is
> > reset to (column + 1), so future serial inserts will get a unique
> > value.
> >
In my experience the second of these two statements is incorrect.
INSERT INTO mytable VALUES( 123, .... )
will result in the value 123 being inserted into the serial column.
Therefore I can happly unload a master table which uses a serial
column as the unique key, drop & recreate the table, and load the
data back without the dependancies getting stuffed. Just as
well, really! (g)
--
============================================================================
Sally Woolrich | This mail contains my personal
sally@excelsis.demon.co.uk | views not those of my employer!
============================================================================