# UPPER

## Syntax

```sql
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](https://mariadb.com/docs/server/reference/data-types/string-data-types/binary), [VARBINARY](https://mariadb.com/docs/server/reference/data-types/string-data-types/varbinary), [BLOB](https://mariadb.com/docs/server/reference/data-types/string-data-types/blob)). The description of [LOWER](https://mariadb.com/docs/server/reference/sql-functions/string-functions/lower)() 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" %}
