Case Sensitivity & ILIKE
Overcome database case sensitivity issues using LOWER(), UPPER(), or the PostgreSQL ILIKE operator.
Case Sensitivity & ILIKE is an essential topic in SQL and relational database engineering.
Overview
Building on foundational principles introduced in like-wildcards, mastering case sensitivity & ilike provides the core mental model and practical query skills needed for production relational database engineering.
-- Portable across all databases:
SELECT * FROM customers WHERE LOWER(city) = 'london';
-- PostgreSQL specific convenient operator:
SELECT * FROM customers WHERE city ILIKE 'London';
Key Concepts
- Understand the fundamental syntax, conventions, and mental model.
- Avoid common beginner traps, data type mismatches, and performance pitfalls.
- Apply practical idioms directly in production applications.
[!TIP] Master this concept to build a rock-solid foundation. Next, proceed to understanding-null.