How to search case sensitively in Postgres
There's nothing special about this, I'm just a dummy who only ever used ilike
and never thought twice about it.
Today, I learned that ilike
is just a case-insensitive version of like
.
This would return any rows with a name of Peter
select * from users
where name ilike '%peter%'
;
This would not return any rows with a name of Peter
select * from users
where name like '%peter%'
;
Stay tuned for tomorrow's TIL where I tell you about how I learned the sky is blue! 😂
Tweet