RE: Initializing primary key values for existing table

2003-06-25 Thread Mike Hillyer
You need simply add the column predefined as AUTO_INCREMENT and PRIMARY KEY: CREATE TABLE incrtest ( name varchar(100) NOT NULL ) TYPE=MyISAM; INSERT INTO incrtest VALUES("ben"); INSERT INTO incrtest VALUES("bob"); INSERT INTO incrtest VALUES("bom"); INSERT INTO incrtest VALUES("gddo"); INSERT

Re: Initializing primary key values for existing table

2003-06-25 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2003-06-25 02:11:05 -0400: > I needed to add a new, autoincrementing, primary key column > to a table and have been struggling to figure out how to > assign an initial, unique value to each row. > > I finally accomplished my task, but feel sure there's an > easier way. >