To specify a particular character as the escape character, use an ESCAPE clause: : Escape « String « SQL / MySQL






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

1.A backslash turns off the special meaning of the character.