I have tried your idea:
Assume the data in each table is:
T1:
id1=1, id2=1, name=a (rec1)
id1=2, id2=2, name=b (rec2)
id1=3, id2=3, name=c (rec3)
id1=4, id2=4, name=d (rec4)
T2:
id1=1, name=asd
id1=3, name=qwe
T3:
id2=2, name=zxc
id2=4, name=none
What I want to take through sql query is:
1. All name from T1 where id1 not in T2 and id2 in T3 so the result must be 2 record rec2 and rec4. Your query does not give that result!
2. More comlicated situation, assume I have change 3 table name sothat they are the same (t1.name=a with t1.id1=1 and t2.name=a with t2.id=5,..) Now I want all id from T1 where T1.name not in T2 and T1.name in T3.
Can anyone help me?