A
A
Anton Volkov2020-06-23 08:11:01
MySQL
Anton Volkov, 2020-06-23 08:11:01

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

1 answer(s)
N
nokimaro, 2020-06-23
@istrebitel_lgg

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 question

Ask a Question

731 491 924 answers to any question