The INITCAP function in PLSQl is used for setting the first character in each word to uppercase and the rest to lowercase.
Words are delimited by white space or characters that are not alphanumeric.
The INITCAP function in PLSQL can accept char can of any of the datatypes such as CHAR, VARCHAR2, NCHAR, or NVARCHAR2. The value returned by the INITCAP function is of the same datatype as char. The database sets the case of the initial characters based on the binary mapping defined for the underlying character set.
string:It is used to specify the string whose first character in each word will be converted to uppercase and all remaining characters converted to lowercase.
The INITCAP function in PLSQL returns a string value.
Supported Versions of Oracle/PLSQL:
- Oracle 12c
- Oracle 11g
- Oracle 10g
- Oracle 9i
- Oracle 8i
DECLARE Test_String string(20) := 'geeksforgeeks'; BEGIN dbms_output.put_line(INITCAP(Test_String)); END;
DECLARE Test_String string(40) := 'Hello, welcome to geeksforgeeks.'; BEGIN dbms_output.put_line(INITCAP(Test_String)); END;
Hello, Welcome To Geeksforgeeks.
- PLSQL | ABS Function
- PLSQL | SIN Function
- PLSQL | COS Function
- PLSQL | MOD Function
- PLSQL | LEAST Function
- PLSQL | TAN Function
- PLSQL | CHR Function
- PLSQL | LN Function
- PLSQL | EXP Function
- PLSQL | LOG Function
- PLSQL | LTRIM Function
- PLSQL | LOWER Function
- PLSQL | INSTR2 Function
- PLSQL | RTRIM Function
- PLSQL | REPLACE Function
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.