Page 1 of 1
[SOLVED] auto_increment
Posted: Thu Feb 03, 2005 10:28 pm
by comtek
Can you change the auto_increment default value after data has been entered? When I created the table I did not specify a default value.
I have since removed all data from the table,
Deleted the field and re-created,
but if set the default to say 10000, it goes thru with no errors, but when I go back to check there is nothing in the default column and new records start back at 0.
Posted: Thu Feb 03, 2005 10:31 pm
by feyd
the next auto_increment value is stored outside the table's normal structure, in it's properties.
viewtopic.php?t=26552
Posted: Thu Feb 03, 2005 10:46 pm
by comtek
Doesn't seem to do it...
I tried setting it at the MySQL command line using the command you refered me to. I've also tried using phpmyadmin... no luck It goes thru like its supposed to but the value is not there when you go back and look at the table config.
This table is a InnoDB and the field is a PK and also a FK in another table, but there is no data in the other table.
Posted: Thu Feb 03, 2005 11:06 pm
by feyd
there is no change to the table's config. Only it's properties.
The change is reflected in the "operations" tab of the table in question while under phpMyAdmin. The change must be done to the table where the key originates I'd imagine.
Posted: Fri Feb 04, 2005 9:25 pm
by comtek
OK took another staba t it tonight and the command line that you refered me too worked.
Thanks for the help.. you do a great job.