INITCAP
INITCAP is a SQL function used to convert the first letter of each word in a specified string to uppercase. All other letters in the word are converted to lowercase.
INITCAP(string)
- string: It refers to the input string on which the INITCAP function is to be applied. This function converts the first letter of each word in the string to uppercase and the rest to lowercase.
Example
Output
Explanation
The INITCAP function in Oracle is used to convert the first letter of each word to uppercase, while the rest of the characters in the word are converted to lowercase. In the given example, ‘hello WORLD’ is converted to ‘Hello World’.
INITCAP(text) RETURNS text
- text: This is the input string that the INITCAP() function will process. It converts the first letter of each word in the text string to uppercase and the remaining to lowercase.
Example
Output
Explanation
In this example, the INITCAP
function modifies the given string ‘hello world’ by capitalizing the first letter of each word, resulting in ‘Hello World’.