List:General Discussion« Previous MessageNext Message »
From:Paul DuBois Date:November 22 2005 4:19am
Subject:Re: UNIQUE constraint, proper use
View as plain text  
At 22:49 -0500 11/21/05, Ferindo Middleton Jr wrote:
>I have this SQL statement:
>                         id                SERIAL,
>                         room_name       TEXT UNIQUE,
>                         location      TEXT,
>                         last_updated  TIMESTAMP DEFAULT 
>                         last_user_updated    TEXT,
>             PRIMARY KEY(id)
>When I run this I get the following error:
>ERROR 1170 (42000): BLOB/TEXT column 'room_name' used in key 
>specification without a key length
>I'm more used to PostgreSQL and when I run this command there, I 
>don't get this error message. I recognized that by changing 
>room_name to a varchar type, I won't get the error message.
>Also, the PostgreSQL mailing lists had a special group from 
>SQL-related issue, but I didn't see one of these types of lists in 
>the lists of groups for MySQL community so I'm sorry if I irritate 
>anyone by posting to the wrong group. Thanks.

What is your question?

Paul DuBois, MySQL Documentation Team
Madison, Wisconsin, USA
UNIQUE constraint, proper useFerindo Middleton Jr22 Nov
  • Re: UNIQUE constraint, proper usePaul DuBois22 Nov
  • Re: UNIQUE constraint, proper useHarald Fuchs22 Nov
  • Re: UNIQUE constraint, proper useMartijn Tonies22 Nov