Suggest an editImprove this articleRefine the answer for “Can you join more than two tables?”. Your changes go to moderation before they’re published.Approval requiredContentWhat you’re changing🇺🇸EN🇺🇦UAPreviewTitle (EN)Short answer (EN)Yes, you can - SQL allows joining **any number of tables** in a single query: each additional `JOIN` simply adds one more table onto the already-joined data, and SQL processes them in sequence, like a chain. **Key point:** every join needs a clear `ON` condition to avoid an accidental cartesian product, and tables should get aliases (short names) to keep the query readable.Shown above the full answer for quick recall.Answer (EN)ImageYes, you can - SQL allows joining **any number of tables** in a single query. The important part is defining the relations between them correctly with `JOIN` and `ON`. ### The principle Each new `JOIN` simply adds one more table onto the already-joined data. SQL processes them sequentially, like a chain. ### Example Say we have three tables: - `users` - `orders` - `products` ```sql SELECT users.name, orders.order_date, products.title, products.price FROM users JOIN orders ON users.id = orders.user_id JOIN products ON orders.product_id = products.id; ``` What happens: 1. `users` gets joined to `orders` on `user_id`, 2. then that result gets joined to `products` on `product_id`. The result is a table of: *user - order - product*. ### You can join 4, 5, or even 10 tables ```sql FROM A JOIN B ON ... JOIN C ON ... JOIN D ON ... ``` SQL processes them **in order**, one step at a time. ### Important - Each join needs a **clear `ON` condition**, to avoid duplication (an accidental *cross join*). - It's better to give tables **aliases** (short names), which makes the query easier to read: ```sql FROM users u JOIN orders o ON u.id = o.user_id JOIN products p ON o.product_id = p.id ``` **Summary:** Yes, you can join **an unlimited number of tables**. The important part is specifying *exactly how they relate to each other*, so the result is logical and correct.For the reviewerNote to the moderator (optional)Visible only to the moderator. Helps review go faster.