All Products
Search
Document Center

MaxCompute:INITCAP

Last Updated:Mar 25, 2026

Converts a string to title case, where the first letter of each word is uppercase and all remaining letters are lowercase. Words are defined as sequences of characters separated by spaces.

Syntax

string initcap(<str>)

Parameters

ParameterRequiredTypeDescription
strYesSTRINGThe input string to convert to title case.

Return value

Return type: STRING

Examples

-- The return value is Odps Sql.
SELECT initcap("oDps sql");

Related functions

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