Home >Database >Mysql Tutorial >How to convert lowercase to uppercase in mysql
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);" .
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.
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.
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.
[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!