0

I have 3 tables Category,subcategory and product

how can I do full outer join between these tables but on version 5.1.69 (mysql)

[category.cat_id] => category table l  
[subcategory.subcat_id] => subcategory tab1e 2  
[product.subcat_id] => product table 3
Sadikhasan
  • 18,365
  • 21
  • 80
  • 122

1 Answers1

0

Have cat_id as a foreign key in Subcategory table and subcat_id as a foreign key in product table.

here is an example inner join:

Select product_name,cat_name,subcat_name 
from Product p,Category c,Subcategory s 
where c.cat_id=s.cat_id and p.subcat_id=s.subcat_id and product_id=121
Ram
  • 3,092
  • 10
  • 40
  • 56
Chatz
  • 338
  • 2
  • 10