Jasonred8
Jasonred8

Reputation: 912

about mysql select field type of `blob`

I have a question about mysql select field type of blob, when I select like "enter image description here" it's garbled but i use the navicat export sql like" enter image description here" I don't know what's type of like "0xFADE571FDC6C7ADBD94444D4562886F8874577843B8F34AF" data and I want to select blob field print data like "0xFADE571FDC6C7ADBD94444D4562886F8874577843B8F34AF" what should i do

Upvotes: 0

Views: 360

Answers (1)

Ani Menon
Ani Menon

Reputation: 28199

BLOB is used for storing binary data.

TEXT maybe used to store strings.

INTEGER maybe used to store HEX values and then you may use HEX(hex_col) while printing it using select.

You may use BINARY to store hex and then use HEX(hex_col) while displaying the values.

Fiddle: Example

Refer:

Storing hexadecimal values as binary in MySQL and Hex literals

Upvotes: 2

Related Questions