Skip to main content

LOWER (SQL)

A case-transformation function that converts all uppercase letters in a string expression to lowercase letters.

Synopsis

LOWER(string-expression)

Description

The LOWER function converts uppercase letters to lowercase for display purposes. This is the inverse of the UPPER function. LOWER has no effects on non-alphabetic characters. It leave unchanged punctuation, numbers, and leading and trailing blank spaces.

LOWER does not force a numeric to be interpreted as a string. InterSystems SQL converts numerics to canonical form, removing leading and trailing zeros. A numeric specified as a string is not converted to canonical form, and retains leading and trailing zeros.

The LCASE function can also be used convert uppercase letters to lowercase.

LOWER has no effect on collation. The %SQLUPPER function is the preferred way in SQL to convert a data value for not case-sensitive collation. Refer to %SQLUPPER for further information on case transformation for collation.

Arguments

string-expression

The string expression whose characters are to be converted to lowercase. The expression can be the name of a column, a string literal, or the result of another scalar function, where the underlying data type can be represented as any character type (such as CHAR or VARCHAR).

Examples

The following example returns each person’s name in lowercase letters:

SELECT Name,LOWER(Name) AS LowName
     FROM Sample.Person

LOWER also works on Unicode (non-ASCII) alphabetic characters, as shown in the following example, which converts Greek letters from uppercase to lowercase:

SELECT LOWER($CHAR(920,913,923,913,931,931,913))
    FROM Sample.Person

See Also

FeedbackOpens in a new tab