Select All Fields From A Table Where A Field In Another Table With An Id Is Equal To A String
I have 2 tables: Ads: Fields ID, A, B and C: +----+---+-------+------+ | ID | A | B | C | +----+---+-------+------+ | 1 | x | y | z | | 2 | c | v | b | | 3
Solution 1:
Use IN in place of =:
SELECT *
FROM Ads
WHERE ID IN (SELECT AdID FROM Requests WHERE Status = 'pending')
Post a Comment for "Select All Fields From A Table Where A Field In Another Table With An Id Is Equal To A String"