Modules
Data Analyst
Data Engineer
Product Data Scientist
AI Engineer
Machine Learning Engineer
Prompt Engineer
ILIKE offers the same functionality as LIKE but disregards case sensitivity. This means 'Apple', 'apple', and 'APPLE' are all considered matches when searching for 'apple' using ILIKE.
With ILIKE you don't need to worry if there is any capital letter because ILIKE simply doesn't care. This is going to make your life easier!
Let's dive into a simple example with this table called books that have 2 columns: published date and title. We want to pull all the published dates that have the word 'the' in it. It can be in the middle, be with a capital T, we want them all!
| Published Date | Title |
|---|---|
| 2023-01-15 | The Great Adventure |
| 2023-03-20 | Mystery of the Old House |
| 2021-11-05 | The Hidden World |
| 2020-06-17 | Lost City |
| 2019-09-23 | Great Mountains |
How would you write this query?
Well, you will simply need to use ILIKE to make it happen!
SELECT published_date
FROM books
WHERE title ILIKE '%the%'
And that's pretty much it!