我有一张table叫 members
```
+----+--------+--------+-------+--+
| id | name | gender | state | |
+----+--------+--------+-------+--+
| 1 | Peter | M | 1 | |
+----+--------+--------+-------+--+
| 2 | Sally | F | 1 | |
+----+--------+--------+-------+--+
| 3 | Martin | M | 0 | |
+----+--------+--------+-------+--+
那么,我的问题是
SELECT * FROM member
WHERE id
= '1 3';
mysql返回 `| 1 | Peter | M | 1 | |` .
但是,我希望它不会返回任何结果,因为不应该有 `id = '1 3'` .
我怎样才能防止这种情况?
1条答案
按热度按时间ff29svar1#
尝试使用
BINARY
```select * from member where BINARY id = '1 3';