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
| Parameter | Required | Type | Description |
|---|---|---|---|
str | Yes | STRING | The 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.