सबसे आसान तरीका है not exists या left join :
select u.*
from users u left join
addresses a
on a.username = u.username and
a.city = 'Peoria'
where a.city is null;
left join उपयोगकर्ताओं के सभी रिकॉर्ड और addresses . में कोई भी रिकॉर्ड रखता है जो on . से मेल खाता हो स्थितियाँ। इस मामले में (क्योंकि शहर का नाम on . में है कंडीशन), यह सभी उपयोगकर्ताओं को या तो शहरों के बारे में जानकारी देता है या NULL मूल्य। where क्लॉज NULL चुनता है मान -- मेल न खाने वाले।
समतुल्य not exists अनुसरण करना आसान हो सकता है:
select u.*
from users u
where not exists (select 1
from addresses a
where a.username = u.username and
a.city = 'Peoria'
);