mysql character conversion function: 1. LCASE(), which can convert the string to lowercase; 2. LOWER(), which can convert the string to lowercase; 3. UCASE(), which can convert the string is uppercase; 4. UPPER() can convert the string to uppercase.
The operating environment of this tutorial: windows7 system, mysql8 version, Dell G3 computer.
mysql character conversion function
1. LCASE() function
LCASE() function Convert string to lowercase.
Syntax:LCASE(text)
Example: Convert the text in "CustomerName" to lowercase
SELECT LCASE(CustomerName) AS LowercaseCustomerName FROM Customers;
2, LOWER( ) Function
LOWER() function converts a string to lowercase.
Syntax:LOWER(text)
Example: Convert the text in "CustomerName" to lowercase
SELECT LOWER(CustomerName) AS LowercaseCustomerName FROM Customers;
3, UCASE( ) Function
UCASE() function converts a string to uppercase.
Syntax:UCASE(text)
Example: Convert the text in "CustomerName" to uppercase
SELECT UCASE(CustomerName) AS UppercaseCustomerName FROM Customers;
4, UPPER( ) Function
UPPER() function converts a string to uppercase letters.
Syntax:UPPER(text)
Example: Convert the text in "CustomerName" to uppercase
SELECT UPPER(CustomerName) AS UppercaseCustomerName FROM Customers;
[Related recommendations:mysql video tutorial】
The above is the detailed content of What is the mysql character conversion function?. For more information, please follow other related articles on the PHP Chinese website!