Heyho,
I need to rewrite the following code without useing a subquery:
SELECT country, region, name
FROM wcities
WHERE( country, region ) NOT IN ( SELECT country, code FROM regions )
AND country = 'IT'
AND region is NOT NULL;
I tried it with:
select c.country, c.region, c.name
from wcities c
join regions r on c.country <> r.country AND c.region <> r.code
where c.country = 'IT'
AND c.region is NOT NULL;
I can see why that does not work, but I can't see what I need to do it.
Thanks in advance :)
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…