Re: probably a stupid question but...

2001-07-08 Thread Don Read
On 08-Jul-01 Jonah Klimack wrote: > > What I don't want, is the same category name and > customerID twice, even if it does have an index column > that differentiates it from other rows. > > > I've tried this: > ID INT NOT NULL AUTO_INCREMENT PRIMARY KEY, > customerID INT UNSIGNED, > categor

Re: probably a stupid question but...

2001-07-08 Thread Jonah Klimack
> Use an index If you mean use a primary key to create a unique record regardless of the other data in the row, I've already done that. However I'm using that primary key as a means of creating a relationship with another table. What I don't want, is the same category name and customerID twice,

Re: probably a stupid question but...

2001-07-07 Thread Justin Farnsworth
Use an index. -- Jonah Klimack wrote: > > Hi > > I want to enforce unique records in one of my > tables. > > The table goes like this: > > ID INT NOT NULL AUTO_INCREMENT PRIMARY KEY, > customerID INT UNSIGNED, > categoryname VARCHAR(20) > > With customer ID pointing to a custome

probably a stupid question but...

2001-07-07 Thread Jonah Klimack
Hi I want to enforce unique records in one of my tables. The table goes like this: ID INT NOT NULL AUTO_INCREMENT PRIMARY KEY, customerID INT UNSIGNED, categoryname VARCHAR(20) With customer ID pointing to a customers table. I suddenly realized that one customer could input the same "category