Get the App
SLTechnology News&Howtos  ›  Database  › 

Mysql's method of converting a string to lowercase

Shulou Source: shulou.com Published: 2022-06-01 02:21:39 09月26日 Update

Editor to share with you mysql's method of converting strings to lowercase. I hope you will gain a lot after reading this article. Let's discuss it together.

In mysql, you can use the lowercase conversion function "LOWER (str)" to convert letters in the string str to lowercase. The lower () function returns that all characters mapped to lowercase based on the current character set are changed to lowercase, that is, lowercase strings.

The lowercase conversion function LOWER (str) in MySQL converts all alphabetic characters in the string str to lowercase.

[example] use the LOWER function to convert all alphabetic characters in the string to lowercase. The input SQL statement and the execution result are shown below.

Mysql > SELECT LOWER ('BLUE'), LOWER (' Blue') +-+-+ | LOWER ('BLUE') | LOWER (' Blue') | +-+-+ | blue | blue | +-+-+ 1 row in set (0.03 sec)

As can be seen from the results, all letters were converted to lowercase, such as "BLUE", and then converted to "blue"; strings with mixed uppercase and lowercase letters were converted to lowercase letters, such as "Blue", and then converted to "bule".

After reading this article, I believe you have some understanding of mysql's method of converting strings to lowercase. If you want to know more about it, you are welcome to follow the industry information channel. Thank you for reading!

Tags: Lowercase characters letters strings functions methods uppercase articles results uppercase letters size character set finished examples more knowledge industry statements information information channels Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Technology Xiaomi Docker MySQL Huawei