MySQL auto increment

Posted by mouthpiec on Stack Overflow See other posts from Stack Overflow or by mouthpiec
Published on 2010-03-31T21:17:51Z Indexed on 2010/03/31 21:23 UTC
Read the original article Hit count: 462

Filed under:
|

Hi,

I have table with an auto-increment field, but I need to transfer the table to another table on another database. Will the value of field 1 be 1, that of field 2 be 2, etc?

Also in case the database get corrupted and I need to restore the data, will the auto-increment effect in some way? will the value change? (eg if the first row, id (auto-inc) = 1, name = john, country = UK .... will the id field remain 1?) I am asking because if other table refer to this value, all data will get out of sync if this field change.

© Stack Overflow or respective owner

Related posts about mysql

Related posts about auto-increment