Forum Moderators: open

Message Too Old, No Replies

Database structure

Error 1075 Incorrect table definition

         

gms3651

3:19 am on Jan 27, 2007 (gmt 0)

10+ Year Member



Hello,
I've created one table that is going to contain every product that I sell. One of the columns in that table is called collectionID. We'll the collectionID column is going to store the row id of another table. That other table is called collections. collections is going to store a list of all the different area rug collections. For example

ID collection
1 Style1
2 Style2
3 Style3
.
.
.

I want each value in the collecion column to be distinct. So I figured I'd set it up to where the ID column is auto_increment and the collection column is the Primary Key (because I want the values in this column to be distinct). However, when I try to save this table I get the following error:

1075 Incorrect table definition there can only be one auto column and it must be defined as a key

Any help would be appreciated.

grandpa

4:16 am on Jan 27, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Read the second user comment on this page [dev.mysql.com] of the MySQL documentation. It may help.