我有一個表有以下數據混淆mysql像查詢與轉義字符?
select * from t;
+----+----------------+
| id | a |
+----+----------------+
| 1 | u5929u732b |
| 2 | \u5929\u732b |
| 3 | \\u5929\\u732b |
+----+----------------+
查詢結果使用等
select * from t where a = '\u5929\u732b';
+----+------------+
| id | a |
+----+------------+
| 1 | u5929u732b |
+----+------------+
select * from t where a = '\\u5929\\u732b';
+----+--------------+
| id | a |
+----+--------------+
| 2 | \u5929\u732b |
+----+--------------+
select * from t where a = '\\\\u5929\\\\u732b';
+----+----------------+
| id | a |
+----+----------------+
| 3 | \\u5929\\u732b |
+----+----------------+
這些結果正如我所預料的那麼沒有問題,然後我用像查詢結果,並在此一次,我很困惑
# as I expected
select * from t where a like '\u5929\u732b';
+----+------------+
| id | a |
+----+------------+
| 1 | u5929u732b |
+----+------------+
# I do not understand I think it should return result of id = 2
select * from t where a like '\\u5929\\u732b';
+----+------------+
| id | a |
+----+------------+
| 1 | u5929u732b |
+----+------------+
# I think it should return result of id = 3
select * from t where a like '\\\\u5929\\\\u732b';
+----+--------------+
| id | a |
+----+--------------+
| 2 | \u5929\u732b |
+----+--------------+
那麼,爲什麼like
查詢是平等的查詢有什麼不同?