INITCAP
Descriptionβ
Capitalizes the first letter of the word contained in the parameter and converts the rest of the letters to lowercase. A word is a sequence of alphanumeric characters separated by non-alphanumeric characters.
Syntaxβ
INITCAP ( <str> )
Parametersβ
Parameter | Description |
---|---|
<str> | The string to be converted |
Return Valueβ
The result of capitalizing the first letter of the word in the parameter <str>
and lowering the rest of the letters.
Exampleβ
SELECT INITCAP('hello hello.,HELLO123HELlo')
+---------------------------------------+
| initcap('hello hello.,HELLO123HELlo') |
+---------------------------------------+
| Hello Hello.,hello123hello |
+---------------------------------------+