Troubles of adding a new ID (auto increment) after table exist
问题 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? 回答1: 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