Code:
query1

select t
from tag

result1

1
2
3
4
5
7
9
The query1 above produces the result1 above.
The query2 below produces the result2 below.
Code:
query2

select t1,t2
from relate

result2

(t1) (t2)
(1)  (2)
(4)  (5)
(7)  (4)
I like to produce like the following.

when key is (1),
it produces all the records which has no relation with the key (1) in relate table.
It will be (3),(4),(5),(7),(9).

when key is (2),
it produces all the records which have no relation with the key (2) in relate table.
It will be (3),(4),(5),(7),(9).

when key is (3),
it produces all the records which has no relation with the key (3) in relate table.
It will be (1),(2),(4),(5),(7),(9).

when key is (4),
it produces all the records which has no relation with the key (4) in relate table.
It will be (1),(2),(3),(9).

when key is (5),
it produces all the records which has no relation with the key (5) in relate table.
It will be (1),(2),(3),(7),(9).

when key is (7),
it produces all the records which has no relation with the key (7) in relate table.
It will be (1),(2),(3),(5),(9).

when key is (9),
it produces all the records which has no relation with the key (9) in relate table.
It will be (1),(2),(3),(5),(6),(7).