clear markdown compare help donate comments/suggestions/bugs a leap of faith? bible365 diddy dollings
clear markdown donate comments/suggestions/bugs a leap of faith? bible365 diddy dollings
By using db<>fiddle, you agree to license everything you submit by Creative Commons CC0. 462289 distinct fiddles created so far.

create table persons (personID int); create table documents (documentID int, personID int); insert into persons values(10),(11),(12),(13),(14),(15); insert into documents values (1,10),(1,11),(1,null),(2,null),(3,11),(3,15);
12 rows affected
 hidden batch(es)


select * from persons where personID in (12,13,14);
personID
12
13
14
 hidden batch(es)


select * from documents where personID in (12,13,14);
documentID personID
 hidden batch(es)


select personID from documents
personID
10
11
11
15
 hidden batch(es)


select * from persons where personID not in (select personID from documents);
personID
 hidden batch(es)


select * from persons where personID not in (select personID from documents where personID is not null);
personID
12
13
14
 hidden batch(es)