List:General Discussion« Previous MessageNext Message »
From:Paul DuBois Date:July 13 1999 12:57pm
Subject:Re: Serial varchar(6) NOT NULL AUTO_INCREMENT
View as plain text  
At 8:29 AM -0400 7/13/1999, Chris wrote:
>I believe you have to use 'auto_increment' with an integer type, not
>'varchar'.

That's right.  MySQL < 3.23 allowed you to specify AUTO_INCREMENT
with non-integer columns.  Beginning with 3.23 if you try to do that,
it will complain.


>
>--Chris
>
>> i want that the Serial will grow automaticly by one each time i enter
>> row, what is wrong ?
>> (now it ask me for the serial)
>>
>> CREATE TABLE zimmer (
>>     -> Serial varchar(6) NOT NULL AUTO_INCREMENT,
>>     -> PRIMARY KEY (Serial),
>>     -> Breakfast ENUM("yes", "no") NOT NULL,
>>     -> TitleA varchar(20) NOT NULL,
>>     -> DescriptionA TINYTEXT NOT NULL,
>>     -> LogoA varchar(15) NOT NULL);

--
Paul DuBois, paul@stripped
Northern League Chronicles: http://www.snake.net/nl/
Thread
Serial varchar(6) NOT NULL AUTO_INCREMENTBen-Nes Michael13 Jul
  • Re: Serial varchar(6) NOT NULL AUTO_INCREMENTA. Brandic13 Jul
    • Re: Serial varchar(6) NOT NULL AUTO_INCREMENTBen-Nes Michael13 Jul
      • Re: Serial varchar(6) NOT NULL AUTO_INCREMENTA. Brandic13 Jul
      • Re: Serial varchar(6) NOT NULL AUTO_INCREMENTTim Sailer13 Jul
    • Re: Serial varchar(6) NOT NULL AUTO_INCREMENTBen-Nes Michael13 Jul
  • Re: Serial varchar(6) NOT NULL AUTO_INCREMENTChris13 Jul
  • Re: Serial varchar(6) NOT NULL AUTO_INCREMENTPaul DuBois13 Jul