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_id!= receiver_id的行?我需要前三行...
答案 0 :(得分:0)
如果只需要在结果中省略它们,请在V_ID
子句中使用888
运算符。
AND
答案 1 :(得分:0)
public class SecurePropertyAccessor extends ReflectivePropertyAccessor {
@Override
public boolean canRead(EvaluationContext context, Object target, String name) {
boolean canRead = // Add your own logic as needed
return canRead;
}
}