Hello,
I agreed with the solution by
[
Maciej Los^].
In addition to the solution want to add one more thing.
As per my understanding of your query and requirement, "oc_product_special" table contains discount information.(If applicable). So, it should be
Left outer join between oc_product and oc_product_special tables. Because in your query result of left side tables is more important. so, u will not get the product_Id with NULL values.
Please try below query:
SELECT oc_product_description.product_id,oc_product_description.name product_name, oc_product.price actual_price, oc_product_special.price discount_price
FROM oc_product
INNER JOIN oc_product_description ON oc_product_description.product_id = oc_product.product_id
LEFT OUTER JOIN oc_product_special ON oc_product.product_id = oc_product_special.product_id
Please let me know if you have any concern or query on this.
Thanks