I have the ID column auto_incrementing and I don't want to change that.  
Newbie that I am, I tried to add auto_increment to another column and 
failed.

Is there any way to have a field other than the ID field increment by a 
set value?

create table test (
        ID mediumint(9) NOT NULL auto_increment default 0,
        visitor_ID mediumint(9) NOT NULL default select 40000 + ID,
        RandomData varchar(10) default null,
        PRIMARY KEY (ID)
) TYPE=MyISAM;

Inserting a new record and only populating RandomData auto increments ID 
as expected but visitor_ID is not incremented.  How can I accomplish 
this?

Charley


---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to