List:General Discussion« Previous MessageNext Message »
From:Paul DuBois Date:September 13 2002 12:21am
Subject:Re: feature proposal: auto increment prefix
View as plain text  
At 0:47 -0500 9/13/02, dvorakv@stripped wrote:
>  > > 2) Make a CHAR (or VARCHAR) AUTO_INCREMENT column with mandatory
>>  > PREFIX. MySQL would then assign values that start with the prefix,
>>  > followed by a sequential number.
>>
>>  This works already for MyISAM and BDB tables.  From the manual:
>>
>>  CREATE TABLE animals (
>>               grp ENUM('fish','mammal','bird') NOT NULL,
>>               id MEDIUMINT NOT NULL AUTO_INCREMENT,
>>               name CHAR(30) NOT NULL,
>>               PRIMARY KEY (grp,id)
>>               );
>
>Yes, I know that an index key can span multiple columns. (Does that
>not work for InnoDB, as you seem to suggest?)

InnoDB supports composite keys that span multiple columns, but it
doesn't support the type of index described above that combines an
AUTO_INCREMENT column with another column to generate multiple sequences.

Thread
Re: feature proposal: auto increment prefixdvorakv13 Sep
  • Re: feature proposal: auto increment prefixPaul DuBois13 Sep