我想在Mysql中找到取消关注的页面,并显示用户不关注的页面列表,让他关注...
这是我的结构:
user: id, name [....]
page: id, name, up [...]
follows : id, user_id, page_id
我想获取用户不关注的页面列表。
最佳答案
select user.id as userid, page.id as pageid
from user, page
where pageid not in(select page_id from follows where user_id = userid)
关于mysql - 如何使用SQL查找unfollow页面?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42545077/