1

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?

zheek
  • 742
  • 1
  • 11
  • 22

2 Answers2

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