To invert a pattern match, use NOT LIKE rather than LIKE:
mysql>
mysql> SELECT 'ABC' LIKE 'A%', 'ABC' NOT LIKE 'A%';
+-----------------+---------------------+
| 'ABC' LIKE 'A%' | 'ABC' NOT LIKE 'A%' |
+-----------------+---------------------+
| 1 | 0 |
+-----------------+---------------------+
1 row in set (0.00 sec)
mysql>
Related examples in the same category