mysql> select 'ab' like 'a_%';
+-----------------+
| 'ab' like 'a_%' |
+-----------------+
| 1 |
+-----------------+
1 row in set (0.00 sec)
mysql> select 'ab' like 'a\_%';
+------------------+
| 'ab' like 'a\_%' |
+------------------+
| 0 |
+------------------+
1 row in set (0.00 sec)
mysql> select 'a_b' like 'a\_%';
+-------------------+
| 'a_b' like 'a\_%' |
+-------------------+
| 1 |
+-------------------+
1 row in set (0.00 sec)
为什么我需要转义_
?