tech on the net
Home About Us Feedback Site Map

Microsoft

Access Excel Word

Database

SQL Oracle / PLSQL SQL Server MySQL MariaDB PostgreSQL

Web Development

HTML CSS Color Picker

Language

C Language

More

ASCII Table Linux UNIX Java Clipart Joke of the Moment
Share this page:

Oracle/PLSQL: UPPER Function

Learn how to use the Oracle/PLSQL UPPER function with syntax and examples.

Description

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

Syntax

The syntax for the Oracle/PLSQL UPPER function is:

UPPER( string1 )

Parameters or Arguments

string1 is the string to convert to uppercase.

Note

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 look at some Oracle UPPER function examples and explore how to use the UPPER function in Oracle/PLSQL.

For example:

UPPER('Tech on the Net'); would return 'TECH ON THE NET'
UPPER('george burns 123   '); would return 'GEORGE BURNS 123   '

Frequently Asked Questions

Question: How do you incorporate the Oracle UPPER function with the LIKE condition? I'm trying to query against a free text field for all records containing the word "test". The problem is that it can be entered in the following ways: TEST, Test, or test.

Answer: To answer this question, let's look at an example.

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

If we wanted to find all records containing the word "test", regardless of whether it was stored as TEST, Test, or test, we could 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 combination of the UPPER function and the LIKE condition to return all of the records where the supplier_name field contains the word "test", regardless of whether it was stored as TEST, Test, or test.