String Functions MySQL Tutorial

mysql>
mysql> SELECT HEX(UNHEX('1267'));
+--------------------+
| HEX(UNHEX('1267')) |
+--------------------+
| 1267               |
+--------------------+
1 row in set (0.02 sec)