Oracle INITCAP function
Description
The Oracle INITCAP() function sets the first letter of each word in uppercase, all other letters in lowercase. Words are delimited by white space or characters that are not alphanumeric.
Uses of Oracle INITCAP Function
- Standardizing Names: Ensures consistent capitalization of names and titles.
- Formatting Text: Converts text to a standard format with capitalized words.
- Improving Readability: Enhances the readability of user-generated text by standardizing the capitalization.
- Data Cleaning: Helps in cleaning and normalizing data by correcting inconsistent letter cases.
- Generating Reports: Produces consistently formatted text for reports and presentations.
Syntax:
INITCAP(string1)
Parameters:
Name | Description | Data Types |
---|---|---|
string1 | A string whose first character in each word will be converted to uppercase and the rest characters will be converted to lowercase. | CHAR, VARCHAR2, NCHAR, NVARCHAR2, CLOB, or NCLOB |
Return Value Type:
CHAR, VARCHAR2, NCHAR, NVARCHAR2, CLOB, or NCLOB
Note: For linguistic-sensitive uppercase and lowercase, refer to NLS_INITCAP.
Applies to:
Oracle 12c, Oracle 11g, Oracle 10g, Oracle 9i, Oracle 8i
Pictorial Presentation
Examples: Oracle INITCAP function
The following example capitalizes each word in the string:
SQL> SELECT INITCAP('steven king') "Emp. Name" FROM DUAL;
Output :
Emp. Name ----------- Steven King
It will be nice if you may share this link in any developer community or anywhere else, from where other developers may find this content. Thanks.
https://www.w3resource.com/oracle/character-functions/oracle-initcap-function.php
- Weekly Trends and Language Statistics
- Weekly Trends and Language Statistics