Skip to main content

LOWER

Functions › Text › Case and length

Returns a string with every letter in lower case.

Syntax​

LOWER( <string> )

Arguments​

ArgumentDescription
<string>The text to convert. A number, boolean or date is converted as its text.

Returns​

Text. NULL when <string> is NULL.

Usage notes​

  • Letters outside ASCII are converted too: LOWER('ÉCOLE') is école.
  • Use it to compare text without regard to case. ILIKE does the same for a pattern.
  • On large tables the engine runs it in the data store, in the select list and in WHERE.

Examples​

SELECT c.key, LOWER(c.email) AS email
FROM Customer c
WHERE LOWER(c.email) LIKE '%@example.com'
keyemail
C-104ana.ruiz@example.com
C-221j.smith@example.com

Group names that differ only in case:

SELECT LOWER(a.name) AS name, COUNT(*) AS accounts
FROM tables.crm.account a
GROUP BY LOWER(a.name)
HAVING COUNT(*) > 1
nameaccounts
northwind traders2

See also​

UPPER · INITCAP · LIKE · TRIM