On this page
  1. LOWER
  2. Syntax & Overview
  3. Notes & Best Practices
  4. Example

LOWER

Prev: `LAG` | Up: functions | Next: `CURRENT TIMESTAMP`
Rel: functions, Aggregations, CTEs & Window Functions
Ref: PostgreSQL — SQL Commands
Tags: #public #databases #sql #functions #tier/standard


Syntax & Overview

LOWER(email)  /* + UPPER(), TRIM(), LENGTH() */

Converts ASCII/Unicode text to lowercase for normalized comparisons.

Notes & Best Practices

Example

CREATE UNIQUE INDEX idx_users_lower_email ON users (LOWER(email));
SELECT id FROM users WHERE LOWER(email) = LOWER('Ada@Example.com');

Linked from

Related notes