标签: mysql sql
我有2张桌子
1_products id, code, make, model, fk_group_id 1_stock id, stock, repair
我希望能够根据第一个中的匹配返回两个表中的所有行。说WHERE fk_group_id = 11
WHERE fk_group_id = 11
答案 0 :(得分:1)
这是一个:
SELECT * FROM products AS p INNER JOIN stock AS s ON p.id = s.id WHERE fk_group_id = 11