Reputation: 90
I am trying to find all results from my product table that id
's exist in another table. I was thinking maybe something like this might work:
SELECT *
FROM Product AS p
JOIN Resource_Downloads_History AS r
WHERE p.Resource_Id = 3
AND r.Resource_Id = 3'`
Many thanks if anyone can help point me in the correct direction and tell me what I have done wrong.
Upvotes: 1
Views: 5814
Reputation: 7890
SELECT *
FROM Product AS p
JOIN Resource_Downloads_History AS r
ON r.Resource_Id = p.Resource_Id
Upvotes: 9