I try to get all products from a table Productsand at the same time retrieve the table Company_Namefrom Company. The common column in my table is Company_Id.
I am using this query:
SELECT
products.product_id,
products.product_name,
products.product_desc,
products.unit_price,
products.stock_level,
products.product_image,
products.gender,
products.type_of_acct,
products.product_cname,
products.product_cdesc,
products.company_id,
company.company_name
FROM
products
INNER JOIN
company ON products.company_id = company.company_id
However, this only shows all the products of a particular company.
I need to show all the products.
source
share