Oracle LOWER Function

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)

Try it

Output:

'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)

Try it

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

Here is the result:

Oracle LOWER function example

Summary #

  • Use the Oracle LOWER() function to convert all letters of a string to lowercase.
Was this tutorial helpful?