I have two tables,tab1 & tab2.
tab1(T1) tab2(T2)
a1 b1
b1 c1
c1 f1
d1 g1
I am looking for the values from table T1 that are not present in T2.
In this case, the output should be a1 d1
I have tried with the following query but couldn't get the right solution.
select distinct tab1.T1 from tab1 left semi join tab2 on (tab1.T1!=tab2.T2);
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…