LOWER function

<< Click to Display Table of Contents >>

Navigation:  Local SQL > Data Manipulation Language > Functions >

LOWER function

Previous pageReturn to chapter overviewNext page
hmtoggle_plus1See also

Converts all characters to lowercase.

LOWER(column_reference)

Description

Use LOWER to convert all of the characters in a character value (column, literal, parameter, or caculated values) to lowercase. For example, in the SELECT statement below the values in the Name column appear all in lowercase.

SELECT LOWER(Name)

FROM Country

When applied to retrieved data of a SELECT statement, the effect is transient and does not affect stored data. When applied to the update atoms of an UPDATE statement, the effect is persistent and permanently converts the case of the stored values.

The LOWER function can be used in WHERE clause string comparisons to effect a case-insensitive comparison. Apply LOWER to the values on both sides of the comparison operator (if one of the comparison values is a literal, simply enter it all in lower case).

SELECT *

FROM Cames

WHERE LOWER(LastName) = "smith"

Applicability

LOWER can only be used with character columns or literals. To use on values of other data types, the values must first be converted to CHAR using the CAST function.

Note: The LOWER function cannot be used with memo or BLOB columns.

Note: The lower case version of a given character is determined by the language driver used.