Added ILIKE part. (#21705)
This commit is contained in:
@ -6,6 +6,14 @@ title: SQL LIKE Operator
|
|||||||
### LIKE Operator defined
|
### LIKE Operator defined
|
||||||
The `LIKE` operator is used in a `WHERE` or `HAVING` (as part of the `GROUP BY`) to limit the selected rows to the items when a column has a certain pattern of characters contained in it.
|
The `LIKE` operator is used in a `WHERE` or `HAVING` (as part of the `GROUP BY`) to limit the selected rows to the items when a column has a certain pattern of characters contained in it.
|
||||||
|
|
||||||
|
### ILIKE Opeartor
|
||||||
|
The 'ILIKE' works same as 'LIKE' but it ignores case-sensitivity in the string. The provided pattern string should be the case-sensitive else you will get an error. To avoid these errors, just write `ILIKE` instead of `LIKE`.
|
||||||
|
For Example,
|
||||||
|
```sql
|
||||||
|
FullName LIKE 'monique%' // --you will face error because the name saved in Database is 'Monique'.
|
||||||
|
FullName ILIKE 'monique%' // --you will not see any error now.
|
||||||
|
```
|
||||||
|
|
||||||
### This guide will demonstrate:
|
### This guide will demonstrate:
|
||||||
* Determining if a string starts or ends with a given string pattern
|
* Determining if a string starts or ends with a given string pattern
|
||||||
* Determining if a pattern exists in the middle of the string
|
* Determining if a pattern exists in the middle of the string
|
||||||
|
Reference in New Issue
Block a user