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. 462258 distinct fiddles created so far.

create table tbl (fld1 text, fld2 text); insert into tbl values ('abc', 'D123'), ('xyz', 'D123'), ('abc', 'D125'), ('abc', 'D128'), ('def', 'D128'), ('abc', 'D789');
6 rows affected
 hidden batch(es)


select t1.* from tbl t1 where fld1 = 'abc' and exists (select 1 from tbl t2 where t2.fld2 = t1.fld2 group by fld2 having count(*) = 1);
fld1 fld2
abc D125
abc D789
 hidden batch(es)