Home >Database >Mysql Tutorial >What is the mysql character conversion function?

What is the mysql character conversion function?

青灯夜游
青灯夜游Original
2021-12-27 17:14:554881browse

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.

What is the mysql character conversion function?

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!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn