INITCAP

Updated at:

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. STRING type. Input string.

Return value

Returns a string with the first letter of each word uppercase and the rest lowercase.

Examples

-- Returns 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 Overview.