hex(), unhex()

hex:可以用HEX()函数将一个字符串或数字转换为十六进制格式的字符串

unhex:把十六进制格式的字符串转化为原来的格式

如:  mysql> select hex('abc');
+------------+
| hex('abc') |
+------------+
| 616263     |
+------------+
1 row in set (0.01 sec)

mysql> select unhex(616263);
+---------------+
| unhex(616263) |
+---------------+
| abc           |
+---------------+
1 row in set (0.00 sec)

猜你喜欢

转载自jis117.iteye.com/blog/2117238
hex