All Products
Search
Document Center

MaxCompute:TOLOWER

Last Updated:Jul 17, 2023

Converts uppercase letters in a string specified by source into lowercase letters.

Syntax

string tolower(string <source>)

Parameters

source: required. A value of the STRING type. If the input value is of the BIGINT, DOUBLE, DECIMAL, or DATETIME type, the value is implicitly converted into a value of the STRING type before calculation. Only English characters are supported.

Return value

A value of the STRING type is returned. The return value varies based on the following rules:

  • If the value of source is not of the STRING, BIGINT, DOUBLE, DECIMAL, or DATETIME type, an error is returned.

  • If the value of source is null, null is returned.

Examples

  • Example 1: Convert uppercase letters in a string into lowercase letters. Sample statement:

    -- The return value is abcd. 
    select tolower('aBcd');
    -- The return value is china fighting. 
    select tolower('China Fighting');
  • Example 2: The input parameter is set to null. Sample statement:

    -- The return value is null. 
    select tolower(null);

Related functions

TOLOWER is a string function. For more information about functions related to string searches and conversion, see String functions.