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.
我有表 a 连接表 b,我只想要表 a 中不存在于表 b 中的记录。
我的部分查询是:
SELECT DISTINCT u.id, u.lastname FROM user u LEFT JOIN context ct ON ct.userid = u.id
谢谢你。
select distinct u.id, u.lastname from user u left join context ct on ct.userid = u.id where ct.userid is null