Re: Filling column

2004-05-12 Thread Michael Stassen
If I understand you, you've created a new INT column which is empty, and you want to fill it. If so, you could SET @i = 0; UPDATE yourtable SET your_int_col = (@i:= @i + 1); I would imagine that there is an order you want for the resulting sequence. In that case, you should add an ORDER BY

Re: Filling column

2004-05-12 Thread SGreen
Hi, Is there a function to fill an integer column in incremental order (1,2,..,n). Cannot use Auto_Increment as the table has another primary key. regards Hello A Z, You can declare a column as AUTO_INCREMENT without designating it as a primary key. However, having more than 1 auto_incremen

Re: Filling column

2004-05-12 Thread Victoria Reznichenko
A Z <[EMAIL PROTECTED]> wrote: > > Is there a function to fill an integer column in > incremental order (1,2,..,n). > Cannot use Auto_Increment as the table has another > primary key. > Auto_increment column isn't necessarily to be primary key, it must be indexed. -- For technical support co

Filling column

2004-05-12 Thread A Z
Hi, Is there a function to fill an integer column in incremental order (1,2,..,n). Cannot use Auto_Increment as the table has another primary key. regards Yahoo! Messenger - Communicate instantly..