HEX(numeric_expr)

Returns the hexadecimal representation of the numeric value in character form.

 

Example:

SELECT HEX(15) returns F (hexadecimal value of 15)