Reputation: 519
I have two MySQL tables table1 and table 2.
Table 1:-
batch semester scode
IT 6 DA
IT 6 IA
IT 6 FA
Table 2:-
batch subject user
IT DA 1
I want to run a query to get this output:-
scode
IA
FA
So basically I want to retrieve values from table 1 which does not exist in table2 for a user with id 1 and where the batch is IT and the semester is 6. I am new to the concepts of fetching data from two tables so I am unable to think of a way to do this. Any help is highly appreciated.
Upvotes: 0
Views: 58