well, it takes two teams
ALTER TABLE your_table ADD COLUMN your_column INTEGER UNIQUE;
And then for each column entry you create instructions for updating for this, for example:
UPDATE your_table SET your_column = 1 WHERE column = 'A' UPDATE your_table SET your_column = 2 WHERE column = 'B'
Or you create a procedure for this if there are a lot of records.
source share