SELECT 'AA' LIKE 'A%', 'AA' LIKE 'A\%', 'A%' LIKE 'A\%';
mysql>
mysql> SELECT 'AA' LIKE 'A%', 'AA' LIKE 'A\%', 'A%' LIKE 'A\%';
+----------------+-----------------+-----------------+
| 'AA' LIKE 'A%' | 'AA' LIKE 'A\%' | 'A%' LIKE 'A\%' |
+----------------+-----------------+-----------------+
| 1 | 0 | 1 |
+----------------+-----------------+-----------------+
1 row in set (0.00 sec)
mysql>
mysql> SELECT 'AA' LIKE 'A_', 'AA' LIKE 'A\_', 'A_' LIKE 'A\_';
+----------------+-----------------+-----------------+
| 'AA' LIKE 'A_' | 'AA' LIKE 'A\_' | 'A_' LIKE 'A\_' |
+----------------+-----------------+-----------------+
| 1 | 0 | 1 |
+----------------+-----------------+-----------------+
1 row in set (0.00 sec)
mysql>
Related examples in the same category