09.05.2017, 17:48
Every table should have a primary key. The primary key is a field or a combination of fields that can uniquely identify the row in the table. Theoretically you can make the name the primary key because it's supposed to be unique, but text searches are slow (like I said before). Most people will put the primary key as the first column(s) in the table but it doesn't really matter where it is placed.
Just create an int column, tick auto_increment (may be abbreviated A_I in phpMyAdmin) and then click 'primary key'. It should automatically assign an ID to existing rows. Then in your script create a new specifier in your enum and call it SQLID or something like that. For further updates you use that instead of the name.
Just create an int column, tick auto_increment (may be abbreviated A_I in phpMyAdmin) and then click 'primary key'. It should automatically assign an ID to existing rows. Then in your script create a new specifier in your enum and call it SQLID or something like that. For further updates you use that instead of the name.

