Convert a String to Uppercase in Oracle

Convert a String to Uppercase in Oracle

  • SQL
  • 1 min read

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: