Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • ASCII(str) String Function MySQL

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 291
    Comment on it

    String-valued functions return NULL, if the the result's length would be greater than the value of the max_allowed_packet system variable.

    The first position of a string (for those functions which operate on string), is numbered 1.

    Noninteger arguments are rounded to the nearest integer (For functions that take length arguments).

    ASCII(str)

    ASCII string function returns the numeric value of the leftmost character of the string str. It returns 0 if str is a empty string. It will returns NULL if str is NULL. ASCII() method works for 8-bit characters.

    FOR example ASCII value of '3' is 51 and ASCII value of 'al' 97;

    mysql> SELECT ASCII('3');
            -> 51
    mysql> SELECT ASCII('al');
            -> 97
    

 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: