开发者

Ideal Field Type For Fixed Width Binary Data

If I want to store binary data (hash values) and they're always 128bytes long, what field type should I use? BLOBs are nice, but they aren't fixed width (and result in dynamic tables).. CHAR requires a ch开发者_开发知识库arset.


You can use BINARY, so BINARY(128).

Note that if you're storing character data, then the standard character set of the operating system is used to convert the character to it's byte value, so you'd have to take any cross-platform issues into consideration.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜