mlse
05-17-2005, 06:50 PM
Hi,
I am having problems with the UNIQUE keyword.
I have created a table as follows:
create table MyTable (
category int(32),
order int(32),
type_A text,
type_B text);
This is fine.
What I want to do, however, is to create the table as follows:
create table MyTable (
category int(32),
order int(32),
type_A text,
type_B text,
constraint UniqueABConstraint unique(type_A, type_B));
This, however, just throws up the error:
"ERROR 1170: BLOB column 'type_A' used in key specification without a key length".
When I look in the MySQL help file about this error, all it says is "This error is returned when a BLOB column is used in a key specification without a key length". Well, that's just about the most helpfull thing I've ever read in my life ...
Does anyone know what it means?? (In English!).
TIA,
Mike.
I am having problems with the UNIQUE keyword.
I have created a table as follows:
create table MyTable (
category int(32),
order int(32),
type_A text,
type_B text);
This is fine.
What I want to do, however, is to create the table as follows:
create table MyTable (
category int(32),
order int(32),
type_A text,
type_B text,
constraint UniqueABConstraint unique(type_A, type_B));
This, however, just throws up the error:
"ERROR 1170: BLOB column 'type_A' used in key specification without a key length".
When I look in the MySQL help file about this error, all it says is "This error is returned when a BLOB column is used in a key specification without a key length". Well, that's just about the most helpfull thing I've ever read in my life ...
Does anyone know what it means?? (In English!).
TIA,
Mike.