If the column was full of 0s when you recreated it, that means you
forgot to make it AUTO_INCREMENT. Since it didn't complain about
duplicate key entries, you also didn't make it a PRIMARY KEY. That is,
you must have done something like
ALTER TABLE c1 ADD c_serial INT NOT NULL;
Peter's
Hi MySQL fans ;-),
I was just asked recently with the task to recreate a tables index
gracefully on a MyIsam table.
This is the table layout:
CREATE TABLE `cl` (
`c_serial` int(11) NOT NULL auto_increment,
`cname` tinytext NOT NULL,
`cl_vals` text NOT NULL,
`utime` int(11) NOT NULL
Nils,
So the task is to recreate the current primary key (c_serial),so that the
current index would start with 1,2,3,4,
SET @i=0;
UPDATE c1 SET c_serial=(@i:[EMAIL PROTECTED]);
PB
-
Nils Valentin wrote:
Hi MySQL fans ;-),
I was just asked recently with the task to recreate a tables index
Hi Peter,
thanks a bunch,
I new that it must have been something simple like this. I am just no
programmer. ;-)
Thanks a bunch !!
Best regards
Nils Valentin
Tokyo / Japan
On Sunday 10 April 2005 23:41, Peter Brawley wrote:
Nils,
So the task is to recreate the current primary key