List:General Discussion« Previous MessageNext Message »
From:Pat Sherrill Date:March 7 2001 12:56pm
Subject:Re: key lengths
View as plain text  
BLOBS and TEXT columns used as indices require the length to be specifically
enumerated.
(Sec 7.26 of the manual)

 CREATE TABLE foo(
 id INT NOT NULL AUTO_INCREMENT,
 name BLOB NOT NULL,
 PRIMARY KEY(id),
 UNIQUE(name(500))
 );

Pat...
patrick@stripped

----- Original Message -----
From: "Mike Thompson" <mrt@stripped>
To: "mysql" <mysql@stripped>
Sent: Tuesday, March 06, 2001 1:51 PM
Subject: key lengths


> How is key length for a table defined?  It seems that the default is 255
> bytes, but in the online docs it mentions 500 byte keys.  I happen to
> have some very long case sensitive strings that I need to use as keys,
> but mysql complains when I try to create a table as such
>
> CREATE TABLE foo(
> id INT NOT NULL AUTO_INCREMENT,
> name BLOB NOT NULL,
> PRIMARY KEY(id),
> UNIQUE(name)
> );
>
> Any thoughts?
> --m
>
> ---------------------------------------------------------------------
> Before posting, please check:
>    http://www.mysql.com/manual.php   (the manual)
>    http://lists.mysql.com/           (the list archive)
>
> To request this thread, e-mail <mysql-thread67485@stripped>
> To unsubscribe, e-mail
<mysql-unsubscribe-patrick=coconet.com@stripped>
> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
>

Thread
key lengthsMike Thompson7 Mar
  • Re: key lengthsPat Sherrill7 Mar
  • Re: key lengthsMike Thompson7 Mar
    • Re: key lengthsJeremy D. Zawodny10 Mar
Re: key lengthsAU)8 Mar