var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Unanswered: Simple query: Serial column value after insert
I have a simple informix query that I hope you can help with. I don't have access to an informix db right now so I can't run a test to find the answer to my query.
If I have a table with a serial column:
CREATE TABLE newtab ( newcol SERIAL);
And the internal counter is set to 10 by inserting a value of 10:
INSERT INTO newtab VALUES ( 10 ); -- internal counter = 10
If I then insert some lower values, ie:
INSERT INTO newtab VALUES ( 5 );
INSERT INTO newtab VALUES ( 6 );
INSERT INTO newtab VALUES ( 7 );
Would the value of the serial column remain unchanged?
I'm trying to figure out if inserting a bunch of lower id rows into the table would affect the value of the serial field.
Thanks in advance!
Last edited by anni01; 07-17-14 at 16:18.
Reason: fix typo
the serial value will increment only if you insert the value of 0 (zero) for the serial column. if not zero, it will take the value provided by your application.
THe last case is something I would recommand to do with extrememe precaution ....
Tags for this Thread