Oracle / PLSQL: UPPER Function

This article is written about how to use the Oracle/PLSQL UPPER feature with syntax and examples.

Description

The Oracle/PLSQL UPPER feature converts all letters in the specific string to uppercase. If there are characters in the string that are now not letters, they are unaffected by way of this function.

Syntax

The syntax for the UPPER characteristic in Oracle/PLSQL is:

UPPER( string1 )

Parameters or Arguments

string1

The string to convert to uppercase.

Returns

The UPPER function returns a string value.

Note

See also the LOWER function.

Applies To

The UPPER function can be used in the following versions of Oracle/PLSQL:

Oracle 12c, Oracle 11g, Oracle 10g, Oracle 9i, Oracle 8i

Example

Let’s seem to be at some Oracle UPPER function examples and discover how to use the UPPER characteristic in Oracle/PLSQL.

For example:

UPPER('Tech on the Net')
Result: 'TECH ON THE NET'

UPPER('george burns 123   ')
Result: 'GEORGE BURNS 123   '

Frequently Asked Questions

Question: How do you include the Oracle UPPER characteristic with the LIKE condition? I’m making an attempt to question in opposition to a free text discipline for all archives containing the phrase “test”. The problem is that it can be entered in the following ways: TEST, Test, or test.

Answer: To answer this question, let’s appear at an example.

Let’s say that we have a suppliers table with a subject called supplier_name that contains the values TEST, Test, or test.

If we wanted to find all files containing the phrase “test”, regardless of whether it used to be stored as TEST, Test, or test, we ought to run either of the following SQL statements:

select * from suppliers
where UPPER(supplier_name) like ('TEST%');

OR

select * from suppliers
where UPPER(supplier_name) like UPPER('test%')

These SQL statements use a aggregate of the UPPER feature and the LIKE condition to return all of the data the place the supplier_name subject consists of the phrase “test”, regardless of whether it was stored as TEST, Test, or test.