How to perform INNER JOIN with multiple tables in MySQL

I need help with joining three MySQL tables using INNER JOIN

I’m working on a database project and I’m having trouble writing a query that combines data from three different tables. I have a customers table, an orders table, and a products table that I need to join together.

The customers table has customer_id and customer_name columns. The orders table contains order_id, customer_id, and product_id. The products table has product_id and product_name fields.

I want to create a query that shows the customer name, order details, and product information all in one result set. I’ve tried a few different approaches but I keep getting syntax errors or unexpected results.

Can someone show me the proper way to write an INNER JOIN query that connects all three tables? I’m particularly confused about how to link the foreign keys correctly when dealing with multiple table relationships.

Any help would be appreciated!

hey sky24, you can just chain the joins like this: SELECT c.customer_name, o.order_id, p.product_name FROM customers c INNER JOIN orders o ON c.customer_id = o.customer_id INNER JOIN products p ON o.product_id = p.product_id; the orders table is ur bridge btw cusotmers and products.