Get the App
SLTechnology News&Howtos  ›  Database  › 

What are the character conversion functions in mysql

Shulou Source: shulou.com Published: 2022-05-31 12:19:38 09月18日 Update

This article mainly introduces what the character conversion functions in mysql have, which can be used for reference by interested friends. I hope you can learn a lot after reading this article.

Mysql character conversion function: 1, LCASE (), can convert the string to lowercase; 2, LOWER (), can convert the string to lowercase; 3, UCASE (), can convert the string to 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

The LCASE () function converts a string to lowercase.

Syntax: LCASE (text)

Example: convert text in "CustomerName" to lowercase

SELECT LCASE (CustomerName) AS LowercaseCustomerNameFROM Customers

2. LOWER () function

The LOWER () function converts a string to lowercase.

Syntax: LOWER (text)

Example: convert text in "CustomerName" to lowercase

SELECT LOWER (CustomerName) AS LowercaseCustomerNameFROM Customers

3. UCASE () function

The UCASE () function converts a string to uppercase.

Syntax: UCASE (text)

Example: convert text in "CustomerName" to uppercase

SELECT UCASE (CustomerName) AS UppercaseCustomerNameFROM Customers

4. UPPER () function

The UPPER () function converts a string to uppercase letters.

Syntax: UPPER (text)

Example: convert text in "CustomerName" to uppercase

SELECT UPPER (CustomerName) AS UppercaseCustomerNameFROM Customers; thank you for reading this article carefully. I hope the article "what are the character conversion functions in mysql" shared by the editor will be helpful to you. At the same time, I also hope you will support us and pay attention to the industry information channel. More related knowledge is waiting for you to learn!

Tags: Functions characters strings uppercase lowercase text examples articles grammar values interests at the same time uppercase letters letters tutorials more friends versions environment Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno vpn Linux Redmi NVidia Docker