Skip to content
SQLSimplified
string

LOWER()

Converts all characters in a string to lowercase.

Description

LOWER converts every letter in a string to its lowercase form. It's commonly used to normalize text before comparing it, since SQL string comparisons are usually case-sensitive by default.

Syntax

LOWER(string)

Parameters

NameDescriptionOptional
stringThe text value or column to convert. Non-letter characters (numbers, punctuation) are left unchanged.No

Return Type

LOWER returns a VARCHAR (text) value.

Examples

Loading playground environment...
Loading playground environment...

Use LOWER for case-insensitive comparisons

If you're not sure whether a text column is stored consistently (some rows 'Action', others 'action'), comparing LOWER(genre) = 'action' is a safer filter than genre = 'Action'.

Common Mistakes

  • Assuming the underlying data changes. LOWER(genre) only affects the query result; it does not update the value stored in the movies table.
  • Forgetting it when comparing user input to stored text. A filter like WHERE genre = 'action' will miss rows stored as 'Action' unless both sides are lowercased with LOWER.
  • Using LOWER on a non-text column. Applying it to a numeric or date column either errors or requires an explicit CAST first.

See also: UPPER, CONCAT, LENGTH.

Cite this resource

SQLSimplified. "LOWER() SQL Function". Available at: https://sqlsimplified.online/reference/lower