Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • LOWER(str) mysql function

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 293
    Comment on it

    LOWER(str)

    LOWER(str) function returns the string str with all characters changed to lowercase according to the current character set mapping. The default character set is latin1 (cp1252 West European).

    Here is a example of this function-

    mysql> SELECT LOWER('Hello MySQL');
    +----------------------+
    | LOWER('Hello MySQL') |
    +----------------------+
    | hello mysql          |
    +----------------------+
    1 row in set (0.00 sec)
    

    MySQL LOWER() function is ineffective when applied to binary strings (BINARY, VARBINARY, BLOB). To perform letter case conversion, convert the string to a nonbinary string:

    I am explaining this by a example-

    mysql> SET @str = BINARY 'Hello MySQL';
    Query OK, 0 rows affected (0.00 sec)
    
    mysql> SELECT LOWER(@str), LOWER(CONVERT(@str USING latin1));
    +-------------+-----------------------------------+
    | LOWER(@str) | LOWER(CONVERT(@str USING latin1)) |
    +-------------+-----------------------------------+
    | Hello MySQL | hello mysql                       |
    +-------------+-----------------------------------+
    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: