Search
 
SCRIPT & CODE EXAMPLE
 

SQL

mysql text type max length

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
Comment

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).
Comment

PREVIOUS NEXT
Code Example
Sql :: postgres read table structure 
Sql :: postgresql select all column names 
Sql :: sql server check port number 
Sql :: oracle create schema 
Sql :: select dba users oracle 
Sql :: bulk kill mysql processlist 
Sql :: mariadb show tables 
Sql :: postgres extract number from string 
Sql :: search column name sql 
Sql :: sql datetime as date 
Sql :: mysql remove last empty newline 
Sql :: SELECT User,Host FROM mysql.user; 
Sql :: mysql dump mysql db cli 
Sql :: alter sequence restart with postgresql 
Sql :: postgres get next sequence value 
Sql :: mysql date - 1 day 
Sql :: sql copy table structure 
Sql :: moodle query item quiz 
Sql :: sql get domain from url 
Sql :: table infromation in sql server 
Sql :: list all tables and columns in postgresql 
Sql :: postgres show current role 
Sql :: oracle view source 
Sql :: c# get sql min date 
Sql :: oracle user quota on tablespace 
Sql :: date_add mysql 
Sql :: add postgresql to path 
Sql :: create sqlite database in laravel 
Sql :: varchar plsql 
Sql :: sous requete sql 
ADD CONTENT
Topic
Content
Source link
Name
8+1 =