Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • CHAR(N,....) string function MySQL

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 476
    Comment on it

    If the length of results is greater then the value if the max_allowed_packet system variable then the String-valued functions will return NULL

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

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

    CHAR(N,... [USING charset_name])

    CHAR() interprets all argument N as an integer and returns a string. NULL values are skipped.

    mysql> SELECT CHAR(77,78);
    +-------------+
    | CHAR(77,78) |
    +-------------+
    | MN          |
    +-------------+
    1 row in set (0.00 sec)
    
    mysql> SELECT CHAR(91,78,92,106);
    +--------------------+
    | CHAR(91,78,92,106) |
    +--------------------+
    | [N\j               |
    +--------------------+
    1 row in set (0.00 sec)
    
    mysql> SELECT CHAR(97,78,92,106);
    +--------------------+
    | CHAR(97,78,92,106) |
    +--------------------+
    | aN\j               |
    +--------------------+
    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: