Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SQL

Maximum length for MySQL type text

Type	          Approx. Length	  Exact Max. Length Allowed
TINYTEXT			256 Bytes				255 characters
TEXT				64 Kilobytes			65,535 characters
MEDIUMTEXT			16 Megabytes			16,777,215 characters
LONGTEXT			4 Gigabytes				4,294,967,295 characters
Basically, it's like:

"Exact Max. Length Allowed" = "Approx. Length" in bytes - 1

Note: If using multibyte characters (like Arabic, where each 
Arabic character takes 2 bytes), the column "Exact Max. 
Length Allowed" for TINYTEXT can hold be up to 127 
Arabic characters (Note: space, dash, underscore, 
and other such characters, are 1-byte characters).
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #Maximum #length #MySQL #type #text
ADD COMMENT
Topic
Name
6+7 =