Home >Database >Mysql Tutorial >How to use the LOWER() function in MySQL

How to use the LOWER() function in MySQL

PHPz
PHPzforward
2023-06-01 17:28:061318browse

LOWER()

LOWER(str) and LCASE(str) functions are used to convert strings to lowercase, for example:

SELECT LOWER('MySQL字符串函数') AS str1, LCASE('MySQL字符串函数') AS str2;
str1          |str2          |
--------------+--------------+
mysql字符串函数|mysql字符串函数|

The MySQL case conversion function does not support binary strings (BINARY, VARBINARY, BLOB)), which can be converted into non-binary strings before processing. For example:

SELECT LOWER(BINARY 'MySQL字符串函数') AS str1,
       LOWER(CONVERT(BINARY 'MySQL字符串函数' USING utf8mb4)) AS str2;
str1               |str2          |
-------------------+--------------+
MySQLå­ ç¬¦ä¸²å ½æ °|mysql字符串函数|

The above is the detailed content of How to use the LOWER() function in MySQL. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:yisu.com. If there is any infringement, please contact admin@php.cn delete