Home > Database > Mysql Tutorial > body text

What is the mysql character conversion function?

青灯夜游
Release: 2021-12-27 17:14:55
Original
4841 people have browsed it

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;
Copy after login

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;
Copy after login

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;
Copy after login

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;
Copy after login

[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!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template