Converts all uppercase letters in a string to lowercase.
| Syntax | string tolower(string <source>) |
|---|---|
| Returns | STRING |
| Example | tolower('aBcd') → 'abcd' |
Parameters
| Parameter | Required | Type | Description |
|---|---|---|---|
source | Yes | STRING | The string to convert. BIGINT, DOUBLE, DECIMAL, and DATETIME values are implicitly converted to STRING before processing. Only English characters are supported. |
Return value
Returns a STRING value.
If
sourceis of an unsupported type (not STRING, BIGINT, DOUBLE, DECIMAL, or DATETIME), an error is returned.If
sourceis null, null is returned.
Examples
-- Returns 'abcd'
SELECT tolower('aBcd');
-- Returns 'china fighting'
SELECT tolower('China Fighting');
-- Returns null
SELECT tolower(null);Related functions
tolower is a string function. For other string search and conversion functions, see String functions.