An interesting SQL:
select a.* FROM A a left outer join B b on a.qq = b.qq
WHERE b.qq is null;
good.
IS null b.qq the WHERE;
.........
? ?
This is not a blank check to give you, check the air is dry wool ah?
A check is that there is no B data.
What does that mean?
First, let's look at the left join is what kind of results. Draw a diagram, but please do not hold anything against
There are A \ B two tables, it will become so after a left join associations:
In the WHERE b.qq is null; isolated within the red box is part of the blue box:
Understand yet is the big brother big brother
end
Reprinted: https://www.imooc.com/article/17676