- Categories:
String & binary functions (Case Conversion)
INITCAP¶
Returns the input string with the first letter of each word in uppercase and the subsequent letters in lowercase.
Syntax¶
Arguments¶
exprThe string expression.
'delimiters'A string of one or more characters that INITCAP uses as separators for words in the input expression:
If
delimitersisn’t specified, any of the following characters in the input expressions are treated as word separators:If
delimitersis specified, the specified value overrides all of the characters listed above.
Supports any UTF-8 characters, including whitespace characters, and is case-sensitive.
Must be enclosed in single quotes, for example
', '(delimiters in this example are,and blank spaces).When specified as an empty string (that is,
''), INITCAP ignores all delimiters, including whitespace characters, in the input expression. The input expression is treated as a single, continuous word. The resulting output is a string with the first character capitalized (if the first character is a letter) and all other letters in lowercase.
Returns¶
This function returns a value of type VARCHAR.
Collation details¶
Arguments with collation specifications currently aren’t supported.
Examples¶
This example provides various outputs in different languages using the default delimiters:
These examples specify delimiters using the delimiters argument: