On Sat, 16 Apr 2005, Hassan Schroeder wrote:

>Dan Bolser wrote:
>> The manual dosn't specify the maximum number of characters in the
>> 
>> TINYTEXT, TEXT, MEDIUMTEXT, and LONGTEXT data types.
>> 
>> http://dev.mysql.com/doc/mysql/en/blob.html
>> 
>> Are these valid synonyms, TINYBLOB, MEDIUMBLOB and LONGBLOB?
>
>The very beginning of the cited page is:
>
><q>
>  A BLOB is a binary large object that can hold a variable amount of
>  data. The four BLOB types, TINYBLOB, BLOB, MEDIUMBLOB, and LONGBLOB,
>  differ only in the maximum length of the values they can hold.
>
>  See Section 11.5, “Column Type Storage Requirements”.
>
>  The four TEXT types, TINYTEXT, TEXT, MEDIUMTEXT, and LONGTEXT,
>  correspond to the four BLOB types and have the same maximum lengths
>  and storage requirements.
></q>
>
>And if you follow that link to Section 11.5, you'll find the size
>of all of the above, and the answer to your question:
>
>> I have a field with just under 1000 characters, am I OK with a TINYTEXT?
>
>:: which is "nope" :-)
>
>FWIW!

FWIW?

Naturally I followed that link, but was unable to understand (or piece
together) the information there in.

Storage Requirements for String Types: 
(or maximum length of BLOB types for dummies)

TINYBLOB   (or TINYTEXT)   = 1+(2^ 8) =        257 characters
BLOB       (or TEXT)       = 2+(2^16) =      65538 characters
MEDIUMBLOB (or MEDIUMTEXT) = 3+(2^24) =   16777219 characters
LONGBLOB   (or LONGTEXT)   = 4+(2^32) = 4294967300 characters

Does that answer my question?

I think it does, but I am not sure. Seems strange not to have this
information at the very begining of the cited page.



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

Reply via email to