I have a table with no primary key. I would like to add a new
auto-increment column field to each record - that would be the easiest
way to remedy this. Eg. 1,2,3,4tagged onto each record successively.
Is this possible with SQL? I also have PHP to use as well if needed.
Thanks
--
MySQL
ALTER TABLE yourtable
ADD id INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY;
See the manual for details http://dev.mysql.com/doc/mysql/en/alter-table.html.
Michael
leegold wrote:
I have a table with no primary key. I would like to add a new
auto-increment column field to each record - that