Categories:

String & binary functions (Case Conversion)

UPPER

Returns the input string with all characters converted to uppercase.

Syntax

UPPER( <expr> )
Copy

Arguments

expr

The string expression.

Returns

This function returns a value of type VARCHAR.

Examples

SELECT v, UPPER(v) FROM lu;
Copy
+----------------------------------+----------------------------------+
|                v                 |             upper(v)             |
+----------------------------------+----------------------------------+
|                                  |                                  |
| 1č2Щ3ß4Ę!-?abc@                  | 1Č2Щ3SS4Ę!-?ABC@                 |
| AaBbCcDdEeFfGgHhIiJj             | AABBCCDDEEFFGGHHIIJJ             |
| KkLlMmNnOoPpQqRrSsTt             | KKLLMMNNOOPPQQRRSSTT             |
| UuVvWwXxYyZz                     | UUVVWWXXYYZZ                     |
| ÁáÄäÉéÍíÓóÔôÚúÝý                 | ÁÁÄÄÉÉÍÍÓÓÔÔÚÚÝÝ                 |
| ÄäÖößÜü                          | ÄÄÖÖSSÜÜ                         |
| ÉéÀàÈèÙùÂâÊêÎîÔôÛûËëÏïÜüŸÿÇ猜Ææ | ÉÉÀÀÈÈÙÙÂÂÊÊÎÎÔÔÛÛËËÏÏÜÜŸŸÇÇŒŒÆÆ |
| ĄąĆćĘꣳŃńÓ󌜏źŻż               | ĄĄĆĆĘĘŁŁŃŃÓÓŚŚŹŹŻŻ               |
| ČčĎďĹ弾ŇňŔ੹ŤťŽž               | ČČĎĎĹĹĽĽŇŇŔŔŠŠŤŤŽŽ               |
| АаБбВвГгДдЕеЁёЖжЗзИиЙй           | ААББВВГГДДЕЕЁЁЖЖЗЗИИЙЙ           |
| КкЛлМмНнОоПпРрСсТтУуФф           | ККЛЛММННООППРРССТТУУФФ           |
| ХхЦцЧчШшЩщЪъЫыЬьЭэЮюЯя           | ХХЦЦЧЧШШЩЩЪЪЫЫЬЬЭЭЮЮЯЯ           |
| [NULL]                           | [NULL]                           |
+----------------------------------+----------------------------------+

UPPER supports collation specifications. This UPPER example specifies collation with the tr (Turkish) locale:

SELECT UPPER('i' COLLATE 'tr');
Copy
+-------------------------+
| UPPER('I' COLLATE 'TR') |
|-------------------------|
| İ                       |
+-------------------------+