Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我目前有
select * from A where A.id not in (select B.id from B where B.user ='b') and A.user <> 'b'
如何更改此查询以使用JOIN-- 类似LEFT JOIN user AS last_replied_user ON topic.last_replied_by = last_replied_user.uid
JOIN
LEFT JOIN user AS last_replied_user ON topic.last_replied_by = last_replied_user.uid
select * from users u left outer join topic t on u.id=t.last_replied_by where t.last_replied_by IS NULL
这将为您提供在主题表的最后一个回复列中未找到用户 ID 的所有用户。