All Products
Search
Document Center

MaxCompute:INITCAP

Last Updated:Jul 24, 2023

Converts a string into a string in the specified format. In this format, words are in title case and are separated by spaces. In title case, the first letter of each word is capitalized, and the other letters of each word are in lowercase.

Syntax

string initcap(<str>)

Parameters

str: required. A value of the STRING type. This parameter specifies the string that you want to convert.

Return value

A string is returned. In this string, the first letter of each word is capitalized, and the other letters of each word are in lowercase.

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.