Let's say I have a table in my database with only text columns. I want to add a primary key so I "ALTER TABLE tablename ADD tableID INT NOT NULL; ALTER TABLE tablename ADD PRIMARY KEY tableID"

What is the SQL to populate this column with unique numbers (1, 2 ...)? Keep in mind that possibly two rows could have the same value, but need different IDs. Is it easier to remove duplicate rows first so that you could read the table and set WHERE col=value, col=value on an UPDATE? Is there a way to do this if all the text columns are the same? Is it scalable to, say, 20,000 records?

Thanks a lot!