title: Add integer column to an existing mysql table based on existing column
body: <p>I want to add a new column to an existing mysql table, where the new column is a unique integer number for each unique value of an existing column in the table.  For example, if the existing column has unique values A and B (and there might be 50 rows of each of A and B), then add a new column with values of 1 and 2 in each row where there is an A and B, respectively. </p>