SELECT follower_id, poster_id, recipient_id
FROM followers
INNER JOIN post on followed_id = poster_id
WHERE follower_id = 1;
returns:
+-------------+-----------+--------------+
| follower_id | poster_id | recipient_id |
+-------------+-----------+--------------+
| 1 | 2 | 2 |
| 1 | 2 | 2 |
| 1 | 2 | 2 |
| 1 | 2 | 7 |
+-------------+-----------+--------------+
有没有办法省略poster\u id!=收件人id?我需要前三排。。。
2条答案
按热度按时间eimct9ow1#
whlutmcx2#
如果只需要在结果中省略它们,请使用
AND
操作员输入WHERE
条款。