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)