I can't seem to figure out a MYSQL command or set of commands that will allow me to create an 'id' field, add auto\_increment values, and then set it as the primary key.

The reason I want to do this is that I have an existing table with millions of rows and I want to assign a unique ID to each row which would become the primary key and have it auto\_increment.

Is there a way to do this with SQL syntax or do I need to write a script?