Reputation: 141
What's difference between BLOB and TEXT data type in mysql ? ( except sortable )
Upvotes: 9
Views: 12823
Reputation: 1
Main difference between BLOB and TEXT: BLOB is casesensetive TEXT.
Upvotes: -2
Reputation: 59660
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.
Upvotes: 19
Reputation: 9440
Mmm google is your friend I guess:
TEXT and CHAR will convert to/from the character set they have associated with time. BLOB and BINARY simply store bytes.
Upvotes: 2