Functions for working with strings

**Usage example**

```
SELECT tryPunycodeDecode('Mnchen-3ya')
```

```
┌─tryPunycodeDecode('Mnchen-3ya')─┐
│ München                         │
└─────────────────────────────────┘
```

## upper[​](#upper "Direct link to upper")

Introduced in: v1.1.0

Converts the ASCII Latin symbols in a string to uppercase.

**Syntax**

```
upper(s)
```

**Aliases**: `ucase`

**Arguments**

- `s` — The string to convert to uppercase. [`String`](/docs/sql-reference/data-types/string)

**Returned value**

Returns an uppercase string from `s`. [`String`](/docs/sql-reference/data-types/string)

**Examples**

**Usage example**

```
SELECT upper('clickhouse')
```

```
┌─upper('clickhouse')─┐
│ CLICKHOUSE          │
└─────────────────────┘
```

## upperUTF8[​](#upperUTF8 "Direct link to upperUTF8")

Introduced in: v1.1.0

Converts a string to uppercase, assuming that the string contains valid UTF-8 encoded text.
If this assumption is violated, no exception is thrown and the result is undefined.

Note

This function doesn't detect the language, e.g. for Turkish the result might not be exactly correct (i/İ vs. i/I).
If the length of the UTF-8 byte sequence is different for upper and lower case of a code point (such as `ẞ` and `ß`), the result may be incorrect for that code point.

**Syntax**

```
upperUTF8(s)
```

**Arguments**

- `s` — A string type. [`String`](/docs/sql-reference/data-types/string)

**Returned value**

A String data type value. [`String`](/docs/sql-reference/data-types/string)

**Examples**

**Usage example**

```
SELECT upperUTF8('München') AS Upperutf8
```

```
┌─Upperutf8─┐
│ MÜNCHEN   │
└───────────┘
```

- [CRC32](#CRC32)- [CRC32IEEE](#CRC32IEEE)- [CRC64](#CRC64)- [appendTrailingCharIfAbsent](#appendTrailingCharIfAbsent)- [ascii](#ascii)- [base32Decode](#base32Decode)- [base32Encode](#base32Encode)- [base58Decode](#base58Decode)- [base58Encode](#base58Encode)- [base64Decode](#base64Decode)- [base64Encode](#base64Encode)- [base64URLDecode](#base64URLDecode)- [base64URLEncode](#base64URLEncode)- [basename](#basename)- [byteHammingDistance](#byteHammingDistance)- [caseFoldUTF8](#caseFoldUTF8)- [compareSubstrings](#compareSubstrings)- [concat](#concat)- [concatAssumeInjective](#concatAssumeInjective)- [concatWithSeparator](#concatWithSeparator)- [concatWithSeparatorAssumeInjective](#concatWithSeparatorAssumeInjective)- [conv](#conv)- [convertCharset](#convertCharset)- [damerauLevenshteinDistance](#damerauLevenshteinDistance)- [decodeHTMLComponent](#decodeHTMLComponent)- [decodeXMLComponent](#decodeXMLComponent)- [editDistance](#editDistance)- [editDistanceUTF8](#editDistanceUTF8)- [encodeXMLComponent](#encodeXMLComponent)- [endsWith](#endsWith)- [endsWithCaseInsensitive](#endsWithCaseInsensitive)- [endsWithCaseInsensitiveUTF8](#endsWithCaseInsensitiveUTF8)- [endsWithUTF8](#endsWithUTF8)- [extractTextFromHTML](#extractTextFromHTML)- [firstLine](#firstLine)- [idnaDecode](#idnaDecode)- [idnaEncode](#idnaEncode)- [initcap](#initcap)- [initcapUTF8](#initcapUTF8)- [isValidASCII](#isValidASCII)- [isValidUTF8](#isValidUTF8)- [jaroSimilarity](#jaroSimilarity)- [jaroWinklerSimilarity](#jaroWinklerSimilarity)- [left](#left)- [leftPad](#leftPad)- [leftPadUTF8](#leftPadUTF8)- [leftUTF8](#leftUTF8)- [lengthUTF8](#lengthUTF8)- [lower](#lower)- [lowerUTF8](#lowerUTF8)- [naturalSortKey](#naturalSortKey)- [normalizeUTF8NFC](#normalizeUTF8NFC)- [normalizeUTF8NFD](#normalizeUTF8NFD)- [normalizeUTF8NFKC](#normalizeUTF8NFKC)- [normalizeUTF8NFKCCasefold](#normalizeUTF8NFKCCasefold)- [normalizeUTF8NFKD](#normalizeUTF8NFKD)- [punycodeDecode](#punycodeDecode)- [punycodeEncode](#punycodeEncode)- [regexpExtract](#regexpExtract)- [removeDiacriticsUTF8](#removeDiacriticsUTF8)- [repeat](#repeat)- [reverseUTF8](#reverseUTF8)- [right](#right)- [rightPad](#rightPad)- [rightPadUTF8](#rightPadUTF8)- [rightUTF8](#rightUTF8)- [soundex](#soundex)- [space](#space)- [sparseGrams](#sparseGrams)- [sparseGramsHashes](#sparseGramsHashes)- [sparseGramsHashesUTF8](#sparseGramsHashesUTF8)- [sparseGramsUTF8](#sparseGramsUTF8)- [startsWith](#startsWith)- [startsWithCaseInsensitive](#startsWithCaseInsensitive)- [startsWithCaseInsensitiveUTF8](#startsWithCaseInsensitiveUTF8)- [startsWithUTF8](#startsWithUTF8)- [stringBytesEntropy](#stringBytesEntropy)- [stringBytesUniq](#stringBytesUniq)- [stringJaccardIndex](#stringJaccardIndex)- [stringJaccardIndexUTF8](#stringJaccardIndexUTF8)- [substring](#substring)- [substringIndex](#substringIndex)- [substringIndexUTF8](#substringIndexUTF8)- [substringUTF8](#substringUTF8)- [toValidUTF8](#toValidUTF8)- [trimBoth](#trimBoth)- [trimLeft](#trimLeft)- [trimRight](#trimRight)- [tryBase32Decode](#tryBase32Decode)- [tryBase58Decode](#tryBase58Decode)- [tryBase64Decode](#tryBase64Decode)- [tryBase64URLDecode](#tryBase64URLDecode)- [tryIdnaEncode](#tryIdnaEncode)- [tryPunycodeDecode](#tryPunycodeDecode)- [upper](#upper)- [upperUTF8](#upperUTF8)

Was this page helpful?