Answer the question
In order to leave comments, you need to log in
Data type in MySQL tables?
What type of data can store characters by type: and
Answer the question
In order to leave comments, you need to log in
The most compact way to store binary data is BINARY or VARBINARY
Another way to store it as a hex string is to use the bin2hex() function, in which case CHAR or VARCHAR can be used.
For example, an md5 hash can be stored in BINARY (16) then one entry will take up 16 bytes in the storage, or in the more familiar hex representation (string 32 characters) in CHAR (32) and then one entry will take up twice as much memory in the storage - 32 bytes.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question