What's difference between BLOB and TEXT data type in mysql ? ( except sortable )
BLOB values are treated as binary strings (byte strings). They have the binary character set and collation, and comparison and sorting are based on the numeric values of the bytes in column values. TEXT values are treated as nonbinary strings (character strings).
BLOB, which stands for a Binary Large Object, is a MySQL data type that can store images, PDF files, multimedia, and other types of binary data.
MySQL TEXT is a standard data type for storing special character strings with maximum sizes or as defined. On the ordering of its character set, the evaluations and sorting are built. In actual, this TEXT data type for a column is composed of four categories. They are TINYTEXT, TEXT, MEDIUMTEXT, LONGTEXT.
The BLOB data type stores any kind of binary data in random-access chunks, called sbspaces. Binary data typically consists of saved spreadsheets, program-load modules, digitized voice patterns, and so on.
BLOB
is used for storing binary data, while TEXT
is used to store large strings.
As stated in the MySQL 5.1 Reference Manual:
BLOB
values are treated as binary strings (byte strings). They have no character set, and sorting and comparison are based on the numeric values of the bytes in column values.TEXT
values are treated as nonbinary strings (character strings). They have a character set, and values are sorted and compared based on the collation of the character set.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With