Skip to content

Commit 4d1f59f

Browse files
committed
Quries for case insensitive search
1 parent 0e06f2a commit 4d1f59f

File tree

4 files changed

+20
-0
lines changed

4 files changed

+20
-0
lines changed
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
SELECT id, name
2+
FROM Student
3+
WHERE name COLLATE Latin1_General_CI_AS like '%PHIL%';
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
SELECT id, name
2+
FROM Student
3+
WHERE REGEXP_LIKE(name, 'PHIL', 'i');
4+
5+
SELECT id, name
6+
FROM Student
7+
WHERE name COLLATE utf8mb4_general_ci LIKE '%PHIL%';
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
SELECT id, name
2+
FROM Student
3+
WHERE name ILIKE '%phil%';
4+
5+
SELECT id, name
6+
FROM Student
7+
WHERE name ~* 'PHIL';
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
SELECT id, name
2+
FROM Student
3+
WHERE LOWER(name) LIKE '%phil%';

0 commit comments

Comments
 (0)