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.
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
- Weekly Trends and Language Statistics
- Weekly Trends and Language Statistics