Category: join

SQL to join one table to another table multiple times? (Mapping products to categories)

Let’s say I have a Product, Category, and Product_To_Category table. A Product can be in multiple categories. Product Category Product_to_category ID | NAME ID | Name Prod_id | Cat_id ===================== ============ =================== 1| Rose 1| Flowers 1| 1 2| Chocolate Bar 2| Food 2| 2 3| Chocolate Flower 3| 1 3| 2 I would like […]