Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • HEX mysql function

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 233
    Comment on it

    HEX(str), HEX(N)

    A hexadecimal string is returened by HEX(), it is a representation of str for a string argument str, where each byte of each character in str is converted to two hexadecimal digits ans multibyte characters are converted more than two digits. The inverse of this operation is performed by the UNHEX() function.

    HEX() returns a hexadecimal string representation for a numeric argument N and N treated as a long (BIGINT) number.

    Here are some example of HEX fuunction-

    mysql> SELECT HEX('hello world');
    +------------------------+
    | HEX('hello world')     |
    +------------------------+
    | 68656C6C6F20776F726C64 |
    +------------------------+
    1 row in set (0.00 sec)
    
    mysql> SELECT HEX(12345);
    +------------+
    | HEX(12345) |
    +------------+
    | 3039       |
    +------------+
    1 row in set (0.00 sec)
    
    mysql> SELECT HEX(255);
    +----------+
    | HEX(255) |
    +----------+
    | FF       |
    +----------+
    1 row in set (0.00 sec)
    

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: