Get the App
SLTechnology News&Howtos  ›  Database  › 

How mysql converts values to uppercase

Shulou Source: shulou.com Published: 2022-05-31 12:40:59 09月25日 Update

This article introduces the knowledge of "how to capitalize the value of mysql". In the operation of actual cases, many people will encounter such a dilemma, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!

In mysql, you can use the UPPER () function to capitalize the value, which converts all alphabetic characters in the string to uppercase, with the syntax "SELECT UPPER (str);".

The operating environment of this tutorial: windows7 system, mysql8 version, Dell G3 computer.

In mysql, you can use the uppercase conversion function UPPER () to uppercase values.

UPPER (str) converts all alphabetic characters in the string str to uppercase.

Syntax:

SELECT UPPER (str)

Str: required. The string to be converted

[example] use the UPPER function to convert all alphabetic characters in a string to uppercase

Mysql > SELECT UPPER ('green'), UPPER (' Green') +-+ | UPPER ('green') | UPPER (' Green') | +-+-+ | GREEN | GREEN | +-+- -+ 1 row in set (0.03 sec)

As can be seen from the results, all alphabetic characters were originally lowercase, converted to uppercase, such as "green", then converted to "GREEN"; strings with mixed uppercase and lowercase letters were converted to uppercase letters, such as "Green", and converted to "GREEN".

That's all for "how mysql converts values to uppercase". Thank you for reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!

Tags: Uppercase characters letters strings functions content lowercase more knowledge grammar practicality learning and then function dilemma uppercase letters size examples actually that is Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno MariaDB OPPO Reno Shulou Technology Docker Apple