使用哪种方法可以将十六进制值作为数字来处理?
要将十六进制值作为数字处理,我们可以使用 CAST(… AS UNSIGNED) 函数。以下示例将演示它 −
mysql> Select 0x54, CAST(0x54 AS UNSIGNED); +------+------------------------+ | 0x54 | CAST(0x54 AS UNSIGNED) | +------+------------------------+ | T | 84 | +------+------------------------+ 1 row in set (0.01 sec)
广告