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
> 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,
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
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