I need a query that can display only the rows which have the correct 'color' variable in a corresponding table.
If I have these tables:
Code:Table 1: id num color 1 1 yes 2 2 yes 3 3 yes 4 4 no 5 5 no 6 6 yesI want to display from Table 2 all data in the 'answer' field UNLESS the corresponding 'num' in Table 1 has 'yes' in the 'color' field.Code:Table 2: id num answer 1 1 345 2 2 456 3 3 567 4 4 875 5 5 342 6 6 801
So I want to display only:
875
342
Thanks!


Reply With Quote

Bookmarks