INITCAP

2023-10-24 09:23:03  Updated

Purpose

You can call this function to return a string with the first letter of each word in uppercase and all other letters in lowercase. Words are delimited by white spaces or non-alphanumeric characters.

Syntax

INITCAP(char)

Parameters

char specifies the source string. It can be of the CHAR, VARCHAR2, NCHAR, or NVARCHAR2 data type.

Return type

The return type is CHAR.

Examples

The following example capitalizes the first letter of each word in the string ABC def,gHI.

obclient> SELECT INITCAP('ABC def,gHI') STR FROM DUAL;
+-------------+
 STR         
+-------------+
 Abc Def,Ghi 
+-------------+
1 row in set

Contact Us