Albatross
May 7th, 2003, 08:59 AM
My SQL is getting rusty
I have table tblA with numbers in it :
tblA.f1
-------
1
2
3
And tblB also with numbers in it :
tblB.f2
-------
11
22
3 entries + 2 entries = 6 entries when I "SELECT tblA.f1, tblB.f2 from tblA, tblB;"
1 11
1 22
2 11
2 22
3 11
3 22
now !!! in a table I have the entries I "Don't Want To See"
tblC
f1 f2
--------
1 11
3 22
How can I SQL these three tables into showing a list of 4 of the 6 entries :
1 22 --- Note that {1 11} and {3 22} are not present because they are defined in tblC
2 11
2 22
3 11
I suspect something really strange is necessary, such as a JOIN.
I have table tblA with numbers in it :
tblA.f1
-------
1
2
3
And tblB also with numbers in it :
tblB.f2
-------
11
22
3 entries + 2 entries = 6 entries when I "SELECT tblA.f1, tblB.f2 from tblA, tblB;"
1 11
1 22
2 11
2 22
3 11
3 22
now !!! in a table I have the entries I "Don't Want To See"
tblC
f1 f2
--------
1 11
3 22
How can I SQL these three tables into showing a list of 4 of the 6 entries :
1 22 --- Note that {1 11} and {3 22} are not present because they are defined in tblC
2 11
2 22
3 11
I suspect something really strange is necessary, such as a JOIN.