MySQL Lists are EOL. Please join:

List:General Discussion« Previous MessageNext Message »
From:Bruce Douglas Date:May 25 2003 2:52am
Subject:RE: create table question....
View as plain text  
forget the question...

a typo as usual....


-----Original Message-----
From: Bruce Douglas [mailto:bedouglas@stripped]
Sent: Saturday, May 24, 2003 6:58 PM
To: 'MySql'
Subject: create table question....


I'm trying to create a simple table with a unique ID, and a unique name. I
tried to create the following table:
  id int(11) NOT NULL auto_increment,
  itemname        varchar(25)     NOT NULL default '',
  unique (itemname),

It generated the following error.....
	ERROR 1075: Incorrect table definition; There can only be one auto column
and it must be defined as a key

Any idea as to how I can have a table with an auto incrementing ID, and
guarantee that the name is unique. I'd also like to be able to use the ID as
the primary key....



MySQL General Mailing List
For list archives:
To unsubscribe:

foreign key help neededCato Liberty24 May
  • Upgrade troublesScott Haneda25 May
    • Re: Upgrade troublesMartin Gainty25 May
      • Re: Upgrade troublesScott Haneda25 May
      • create table question....Bruce Douglas25 May
        • RE: create table question....Bruce Douglas25 May
Re: foreign key help neededHeikki Tuuri25 May