Reputation: 233
My goal is to select two different values,say c & d from table2 using the fields a and b of table1 in a single query.
Any help would be deeply appreciated.
Thanks.
Upvotes: 0
Views: 444
Reputation: 360922
SELECT table2.c, table2.d
FROM table2
JOIN table1 ON table2.some_common_field = table1.other_common_field
WHERE (table1.a = XXX) AND (table1.b = YYY)
Upvotes: 1