Skip
Arish's avatar

52. NOT LIKE - Contains Pattern


Excluding Contains Pattern

sql
1-- Courses NOT containing 'y'
2SELECT * FROM students
3WHERE course NOT LIKE '%y%';

Excludes Python, Ruby...

Example

sql
1-- Names NOT containing 'ar'
2SELECT * FROM students
3WHERE name NOT LIKE '%ar%';