1) how can store hexadecimal value inside MySQL
database?
==> i
want to store SQL
data to MySQL
.
==> in
SQL
data store inside image datatype that i want to store in MySQL
database.
how?
Asked
Active
Viewed 1,544 times
1

zheek
- 742
- 1
- 11
- 22

Kuldip Ladola
- 11
- 5
-
1http://stackoverflow.com/questions/3126210/insert-hex-values-into-mysql – Renjith V R Feb 27 '16 at 09:19
-
http://stackoverflow.com/questions/1712934/storing-hexadecimal-values-as-binary-in-mysql – Renjith V R Feb 27 '16 at 09:19
2 Answers
0
You can use UNHEX() for inserting and HEX() for selecting that HEXADECIMAL
INSERT INTO table (column) VALUES (UNHEX('ABCD1F'))
or
SELECT HEX(column) FROM table

Gopalakrishnan
- 957
- 8
- 19
0
You can use UNHEX() function to convert a hexstring with hex pairs to binary and HEX() to do the other way round.
I.e.
INSERT INTO tbl (col) VALUES (UNHEX('4D2AFF'))
and
SELECT HEX(col) FROM tbl

Drudge Rajen
- 7,584
- 4
- 23
- 43