I would like to insert values into mysql innodb table Auto_Increment
column.
I am loading some data from an old table to new table which has an identity, and need to preserve the existing values from the old table, so I need to preserve the existing Id
values, but keep the column Auto_Increment
for new values.
In MS T-SQL, I would start my insert
query script with SET SET IDENTITY_INSERT MyTable ON
and end the query with SET SET IDENTITY_INSERT MyTable OFF
.
How can I do the same in MySQL?