ये रहा एक तरीका:
select coalesce(t1.ssn, t2.ssn)
from t1 full outer join
t2
on t1.ssn = t2.ssn
where t1.ssn is null or t2.ssn is null;
यह अधिकांश डेटाबेस में काम करता है, लेकिन MySQL में नहीं। निम्नलिखित किसी भी डेटाबेस में काफी हद तक काम करना चाहिए:
select ssn
from ((select ssn, 't1' as which
from t1
) union all
(select ssn, 't2' as which
from t2
)
) t
group by ssn
having count(distinct which) = 1