PostgreSQL - LOWER function - GeeksforGeeks

PostgreSQL - LOWER function

Last Updated : 4 Nov, 2026

The LOWER() function in PostgreSQL converts all uppercase letters in a string to lowercase based on the database's locale rules.

  • Standardize string values and format text consistently.
  • Perform case-insensitive searches.

Syntax

LOWER(string)

Where:

  • string: The text or column value to convert to lowercase. It can be of type CHAR, VARCHAR or TEXT.

Example

The following query converts the string 'PostgreSQL' to lowercase.

Query:

SELECT LOWER('PostgreSQL') 
AS lower_text;

Output:

Screenshot-2026-10-05-115141
  • The LOWER() function converts all uppercase letters in the string to lowercase.

Working

Consider the following books table for the examples below:

Screenshot-2026-10-05-115114

Convert Book Titles to Lowercase

The following query converts the book titles to lowercase.

Query:

SELECT
    LOWER(book_title) AS lower_book_title
FROM
    books
ORDER BY
    book_title;

Output:

Screenshot-2026-10-05-115321
  • The LOWER() function converts all characters in the book_title column to lowercase.

Using LOWER() in the WHERE Clause

The following query retrieves books in the Programming category by comparing the lowercase value.

Query:

SELECT
    book_title,
    category
FROM
    books
WHERE
    LOWER(category) = 'programming';

Output:

Screenshot-2026-10-05-115344
  • The LOWER() function converts the category value to lowercase before comparison, allowing a case-insensitive search.
Comment

Explore