I have a table with 38.000 records, but without any auto increment column like ID.
Now I have to add an ID column, and I’m wondering could there be troubles?
I have a table with 38.000 records, but without any auto increment column like
Share
You problem with definition change to any field is the change is “destructive”. It is best to treat changes like this as a data migration. I have not done this with MySQL, but have had to add auto numbering to SQL Server. The basic idea is the same.
Check the documentation, as MySQL may have a mechanism for adding aut increment without resetting the field. If so, doing it via SQL will solve the problem. In general, I recommend against doing these types of changes visually, with a tool, as most tools are very destructive in their methdology.