In Oracle, you can use the initcap()
function to get the first letter in uppercase in SQL.
INITCAP() Syntax
initcap(string)
Change the first letter in uppercase using initcap() Examples
Capitalizing the first letter using the SQL query:
select initcap('oracle') from dual;
Output:
Oracle
Capitalizing the first letter of a string using PL/SQL program:
declare v_string varchar2(100) := 'oracle'; begin dbms_output.put_line(initcap(v_string)); end;
Output:
Oracle
See also:
- Oracle Apex: Set Item Value to Upper Case
- How to Convert a String to Uppercase Using ORD() Function in PHP?
- Convert to Lowercase in Oracle SQL