TEXT
Complete TEXT type reference: TEXT(M) syntax, 65,535 byte maximum, 2-byte length prefix, DEFAULT value support, and indexing constraints rules.
Syntax
TEXT[(M)] [CHARACTER SET charset_name] [COLLATE collation_name]Description
Examples
Trailing spaces:
CREATE TABLE strtest (d TEXT(10));
INSERT INTO strtest VALUES('Maria ');
SELECT d='Maria',d='Maria ' FROM strtest;
+-----------+--------------+
| d='Maria' | d='Maria ' |
+-----------+--------------+
| 1 | 1 |
+-----------+--------------+
SELECT d LIKE 'Maria',d LIKE 'Maria ' FROM strtest;
+----------------+-------------------+
| d LIKE 'Maria' | d LIKE 'Maria ' |
+----------------+-------------------+
| 0 | 1 |
+----------------+-------------------+Example of TEXT
Data too Long
Indexing
Difference between VARCHAR and TEXT
For Storage Engine Developers
See Also
Last updated
Was this helpful?

