Oracle LOWER

The Oracle LOWER() function converts all letters in a string to lowercase.

Syntax

The following shows the syntax of the Oracle LOWER() function:

LOWER(string)Code language: SQL (Structured Query Language) (sql)

Arguments

The LOWER() function takes one argument:

1) string

is the string whose all characters are converted to lowercase.

Return value

The LOWER() function returns a string with all characters converted to lowercase.

Examples

The following example converts the string 'LOWER Function' to lowercase:

SELECT
  LOWER( 'LOWER Function' )
FROM
  dual;Code language: SQL (Structured Query Language) (sql)

Here is the result:

'lower function'Code language: SQL (Structured Query Language) (sql)

Let’s see the contacts table in the sample database:

contacts table

To search for contacts whose last name is Hill, HILL, or hill, you can use the LOWER() function in the WHERE clause as follows:

SELECT
  first_name, 
  last_name, 
  email
FROM
  contacts
WHERE
  LOWER( last_name ) = 'hill';Code language: SQL (Structured Query Language) (sql)

Notice that the input value must be in lowercase to make the query work as expected.

Here is the result:

Oracle LOWER function example

In this tutorial, we have shown you how to use the Oracle LOWER() function to convert all letters of a string to lowercase.

Was this tutorial helpful?