Thanks to all, but I solved this problem by converting this field to
VARCHAR(255) (the same to TINYTEXT) type.

Chris, I tried your solution, it works but TINYTEXT's index behavior seems
to be very odd. E.g. if length is set to 3 it will never complain about
duplicate 'ab' but shows error in case of duplicate 'abcd' (>= 3 chars).
Why?

Best regards, Denis Gerasimov
Outsourcing Services Manager,
VEKOS, Ltd.
www.vekos.ru

> -----Original Message-----
> From: Chris [mailto:[EMAIL PROTECTED]
> Sent: Thursday, December 23, 2004 9:56 PM
> To: MySQL General List
> Subject: Re: TINYTEXT field uniqueness question
> 
> When specifying an index for TEXT and BLOB types, you must specify a
> length.
> 
> as an example...
> 
> CREATE TABLE test
> (
>   sValue TINYTEXT NOT NULL,
>   UNIQUE KEY(sValue(90))
> )
> 
> 
> 
> Denis Gerasimov wrote:
> 
> >Hello,
> >
> >Is that possible to ensure uniqueness for a TINYTEXT field?
> >I tried to create an index (with UNIQUE constraint) but my GUI tool
> always
> >says me 'Duplicate entry 'X' for key N'
> >
> >Best regards, Denis Gerasimov
> >Outsourcing Services Manager,
> >VEKOS, Ltd.
> >www.vekos.ru
> >
> >
> >
> >
> >
> 
> 
> --
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe:
> http://lists.mysql.com/[EMAIL PROTECTED]


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to