Home >Database >Mysql Tutorial >How to convert lowercase to uppercase in mysql

How to convert lowercase to uppercase in mysql

青灯夜游
青灯夜游Original
2022-01-05 17:11:4711466browse

Mysql method to convert characters from lowercase to uppercase: 1. Use the UPPER() function, the syntax "SELECT UPPER(str);"; 2. Use the LOWER() function, the syntax "SELECT LOWER(str);" .

How to convert lowercase to uppercase in mysql

The operating environment of this tutorial: Windows 10 system, MySQL version 5.7.24, Dell G3 computer.

mysql realizes converting characters from lowercase to uppercase

Prerequisite: Log in to mysql

via cmd command Open a command line window;

Connect to the local database service through the built-in client command mysql of the MySQL database;

For related commands and operations, please refer to the illustration.

How to convert lowercase to uppercase in mysql

Method 1: Convert letters from lowercase to uppercase through the built-in function UPPER

UPPER(letter string), All lowercase letters in the "child-mother string" will be converted to uppercase letters, as shown in the figure.

How to convert lowercase to uppercase in mysql

Method 2: Complete the lowercase letters through the built-in function LOWER Conversion of uppercase letters

LOWER(letter string), all uppercase letters in the "substring" will be converted to lowercase letters, as shown in the figure.

How to convert lowercase to uppercase in mysql

[Related recommendations: mysql video tutorial]

The above is the detailed content of How to convert lowercase to uppercase in mysql. 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