To specify a particular character as the escape character, use an ESCAPE clause:
mysql>
mysql> SELECT 'AA' LIKE 'A@%' ESCAPE '@', 'A%' LIKE 'A@%' ESCAPE '@';
+----------------------------+----------------------------+
| 'AA' LIKE 'A@%' ESCAPE '@' | 'A%' LIKE 'A@%' ESCAPE '@' |
+----------------------------+----------------------------+
| 0 | 1 |
+----------------------------+----------------------------+
1 row in set (0.00 sec)
Related examples in the same category