Home > MyLobEditor, Mysql LOB Editor > The BLOB and TEXT Types

MyLobEditor - Edit Mysql LOB (text, blob) data »

The BLOB and TEXT Types

A BLOB is a binary large object that can hold a variable amount of data. The four BLOB types are TINYBLOB, BLOB, MEDIUMBLOB, and LONGBLOB. These differ only in the maximum length of the values they can hold. The four TEXT types are TINYTEXT, TEXT, MEDIUMTEXT, and LONGTEXT. These correspond to the four BLOB types and have the same maximum lengths and storage requirements.

BLOB columns are treated as binary strings (byte strings). TEXT columns are treated as non-binary strings (character strings). BLOB columns have no character set, and sorting and comparison are based on the numeric values of the bytes in column values. TEXT columns have a character set, and values are sorted and compared based on the collation of the character set.

If strict SQL mode is not enabled and you assign a value to a BLOB or TEXT column that exceeds the column's maximum length, the value is truncated to fit and a warning is generated. For truncation of non-space characters, you can cause an error to occur (rather than a warning) and suppress insertion of the value by using strict SQL mode.

In most respects, you can regard a BLOB column as a VARBINARY column that can be as large as you like. Similarly, you can regard a TEXT column as a VARCHAR column. BLOB and TEXT differ from VARBINARY and VARCHAR in the following ways:

More information, please see http://dev.mysql.com/doc/refman/5.0/en/blob.html


MyLobEditor is a database tool that helps DBA and Database Programmer edit Mysql LOB (text, blob) data directly.

30-day free trial Download MyLobEditor US$75.00 Buy MyLobEditor
Download

30-day free trial
Download MyLobEditor

Requires Windows 2000, XP, 2003, Vista.

Price Info

$75.00 or less

Buy MyLobEditor

30-day money back guarantee