in

Convert a String to Uppercase in Oracle

To convert a string to uppercase, use the upper() function in Oracle. Below are the syntax and examples:

UPPER Function Syntax

upper(char)

UPPER Function Examples

The following SQL query converts a string to uppercase using the upper() function:

select upper('oracle') from dual;

Output:

ORACLE

Using UPPER Function in PL/SQL Program

Below PL/SQL code demonstrates, how to convert a string to uppercase in the program unit:

Declare
  v_string varchar2(100) := 'oracle';
begin
  v_string := upper(v_string);
  dbms_output.put_Line(v_string);
end;

Output

ORACLE

See also:

Written by Rony Dsouza

Rony is an Oracle programmer, having more than 15 years of experience. He likes to write on SQL, PL/SQL, and Oracle Apex topics. Also, expertise in Python, PHP, MySQL, JavaScript, etc.

Leave a Reply

Your email address will not be published. Required fields are marked *