ILIKE is normally used as part of a WHERE clause. ILIKE is case-insensitive; use LIKE for case-sensitive pattern matching. Note that Firebolt uses the POSIX locale, which means that it only classifies the ASCII letters “A” through “Z” and “a” through “z” as letters.
Syntax
Parameters
| Parameter | Description | Supported input types |
|---|---|---|
<expression> | Any expression that evaluates to TEXT | TEXT |
<pattern> | Specifies the pattern to match (case-insensitive). | TEXT constant. SQL wildcards are supported: * Use an underscore ( _) to match any single character* Use a percent sign ( %) to match any number of any characters, including no characters. |
Return Type
BOOLEAN
Example
Find nicknames from theplayers table that partially match the string “Joe” and any following characters as follows:
| playerid | nickname | |
|---|---|---|
| 160 | joedavis | [email protected] |
| 519 | joe79 | [email protected] |
| 3692 | joeli | [email protected] |
| 3891 | joel11 | [email protected] |
| 4233 | joellong | [email protected] |
| 4627 | joebowen | [email protected] |
Unicode Behavior
Firebolt uses thePOSIX locale, therefore ILIKE case insensitivity is limited to ASCII characters. The uppercase and lowercase versions of non-ASCII characters are not matched: