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
    • 503
    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.

    1. mysql> SELECT CHAR(77,78);
    2. +-------------+
    3. | CHAR(77,78) |
    4. +-------------+
    5. | MN |
    6. +-------------+
    7. 1 row in set (0.00 sec)
    8.  
    9. mysql> SELECT CHAR(91,78,92,106);
    10. +--------------------+
    11. | CHAR(91,78,92,106) |
    12. +--------------------+
    13. | [N\j |
    14. +--------------------+
    15. 1 row in set (0.00 sec)
    16.  
    17. mysql> SELECT CHAR(97,78,92,106);
    18. +--------------------+
    19. | CHAR(97,78,92,106) |
    20. +--------------------+
    21. | aN\j |
    22. +--------------------+
    23. 1 row in set (0.00 sec)

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Reset Password
Fill out the form below and reset your password: