'MySQL - when adding an INNER JOIn - this removed specific items
I am trying to query a product stock take to send to a customer.
When I add in the following INNER JOIN which is currently hashed out below it will remove the majority of data.
USE [database];
SELECT
distinct products.products_id,
products.products_status,
products_description.products_name,
products.products_model,
products.products_price,
products.products_cost,
products_stock_location.quantity,
stock_location.stock_location_name
FROM
products
INNER JOIN products_stock_location ON products.products_id=products_stock_location.products_id
INNER JOIN products_description ON products.products_id=products_description.products_id
#INNER JOIN products_with_attributes_stock ON products.products_id=products_with_attributes_stock.products_id
INNER JOIN stock_location ON products_stock_location.stock_locations_id=stock_location_id
;
I suspect its taking the items which have attributes and only displaying them.
Is there a way to display both?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
