Dear MySQL-Fans![]()
There are 2 tables:
table1
-------------
admnr | fbnr
1 | 1
1 | 2
1 | 3
1 | 4
2 | 1
2 | 2
table2
----------------------
fbnr | fbname
1 | mathematics
2 | chemistry
3 | physics
4 | informatics
Now the problem:
I need all 'fbnr' and 'fbname' where 'admnr' 2 is NOT in !
At the end there should be:
fbnr | fbname
3 | physics
4 | informatics
I read and thought and.... but my brain still doesnt give me an answer
I tried this:
SELECT table2.fbnr, table2.fbname FROM table2, table1 WHERE table2.fbnr = table1.fbnr AND NOT (table1.admnr = 2)
Then he gives me 1, 2, 3, 4 of course. I dont know how to do it. Please help me![]()
![]()








Bookmarks