> For the complete documentation index, see [llms.txt](https://mariadb.com/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://mariadb.com/docs/server/reference/sql-functions/string-functions/upper.md).

# UPPER

Convert a string to uppercase. This function returns the string with all characters converted to uppercase.

## Syntax

```bnf
UPPER(str)
UCASE(str)
```

## Description

Returns the string `str` with all characters changed to uppercase according to the current character set mapping. The default is latin1 (cp1252 West European). The result may depend on the collation and character set used. `UCASE` is a synonym.

```sql
SELECT UPPER(surname), givenname FROM users ORDER BY surname;
+----------------+------------+
| UPPER(surname) | givenname  |
+----------------+------------+
| ABEL           | Jacinto    |
| CASTRO         | Robert     |
| COSTA          | Phestos    |
| MOSCHELLA      | Hippolytos |
+----------------+------------+
```

`UPPER()` is ineffective when applied to binary strings ([BINARY](/docs/server/reference/data-types/string-data-types/binary.md), [VARBINARY](/docs/server/reference/data-types/string-data-types/varbinary.md), [BLOB](/docs/server/reference/data-types/string-data-types/blob.md)). The description of [LOWER](/docs/server/reference/sql-functions/string-functions/lower.md)() shows how to perform lettercase conversion of binary strings.

<sub>*This page is licensed: GPLv2, originally from*</sub> [<sub>*fill\_help\_tables.sql*</sub>](https://github.com/MariaDB/server/blob/main/scripts/fill_help_tables.sql)

{% @marketo/form formId="4316" %}
