SQL 字符串类型的长度

阅读(2463)
      Type | Maximum length
-----------+-------------------------------------
  TINYTEXT |           255 (2^8−1) bytes
      TEXT |        65,535 (2^16−1) bytes = 64 KiB
MEDIUMTEXT |    16,777,215 (2^24−1) bytes = 16 MiB
  LONGTEXT | 4,294,967,295 (2^32−1) bytes =  4 GiB

注:KiB 是以1024位单位,KB 是以1000为单位。

via:
http://stackoverflow.com/questions/13932750/tinytext-text-mediumtext-and-longtext-in-mysql-maximum-storage-sizes
http://dev.mysql.com/doc/refman/5.0/en/string-type-overview.html

Tags: