Advertisement

How To insert characters as HEX Numbers in MySQL?

You can use UNHEX() function to convert a hexstring with hex pairs to binary and HEX() to do the other way round. Insert Usage
INSERT INTO tbl (col) VALUES (UNHEX('4D2AFF'));
Select Usage
SELECT HEX(col) FROM tbl;

0 comments

Advertisement