Convert a string to all uppercase or all lowercase characters.
Converts string case to upper or lower. Useful for case-insensitive comparisons and data normalization. Note: case conversion rules vary by locale for non-ASCII characters (Unicode case mapping differs from locale-specific rules).
| Database System | Support Status | Since Version | Notes |
|---|---|---|---|
| MySQL | ✓ Supported | all | UPPER() and LOWER(). Case conversion is locale-aware based on the column's collation. UCASE() and LCASE() are deprecated synonyms. |
| PostgreSQL | ✓ Supported | all | UPPER() and LOWER(). Locale/collation-aware. For case-insensitive comparisons, prefer ILIKE or citext extension rather than manually lowercasing. |
| SQL Server | ✓ Supported | all | UPPER() and LOWER(). Behavior is collation-dependent. Turkish collation (tr_TR) is the classic gotcha — 'i'.UPPER() ≠ 'I' under Turkish collation rules. |
| Oracle | ✓ Supported | all | UPPER() and LOWER(). NLS_LANGUAGE session parameter affects case conversion for locale-specific characters. |
| SQLite | ✓ Supported | all | UPPER() and LOWER() only work on ASCII characters by default. Non-ASCII characters (accented letters, etc.) are NOT case-converted without loading the ICU extension. |
SQLite is the major gotcha — UPPER/LOWER only affects ASCII by default, so accented characters are silently left alone. SQL Server's Turkish collation is a classic production bug. For case-insensitive search, avoid LOWER(col) = LOWER(input) and use engine-native features instead: ILIKE (PostgreSQL), COLLATE (SQL Server/MySQL).
UPPER() and LOWER(). Case conversion is locale-aware based on the column's collation. UCASE() and LCASE() are deprecated synonyms.
UPPER() and LOWER(). Locale/collation-aware. For case-insensitive comparisons, prefer ILIKE or citext extension rather than manually lowercasing.
UPPER() and LOWER(). Behavior is collation-dependent. Turkish collation (tr_TR) is the classic gotcha — 'i'.UPPER() ≠ 'I' under Turkish collation rules.
UPPER() and LOWER(). NLS_LANGUAGE session parameter affects case conversion for locale-specific characters.
UPPER() and LOWER() only work on ASCII characters by default. Non-ASCII characters (accented letters, etc.) are NOT case-converted without loading the ICU extension.