Suggest an editImprove this articleRefine the answer for “What is a cartesian product?”. Your changes go to moderation before they’re published.Approval requiredContentWhat you’re changing🇺🇸EN🇺🇦UAPreviewTitle (EN)Short answer (EN)A cartesian product is **every possible combination of rows** between two tables: if the first table has 10 rows and the second has 5, the result is **10 × 5 = 50 rows**, since every row of the first table pairs with every row of the second, regardless of logic or matching data. **Key point:** in SQL this comes from `CROSS JOIN` or from mistakenly using `JOIN` without an `ON` condition; the technique is also used deliberately to generate all possible combinations, e.g. sizes, dates, or test data.Shown above the full answer for quick recall.Answer (EN)ImageA cartesian product is **every possible combination of rows** between two tables. If the first table has 10 rows and the second has 5, the result is **10 × 5 = 50 rows**. Every row of the first table pairs **with every row of the second**, regardless of logic or matching data. In SQL this comes from `CROSS JOIN` or from mistakenly using `JOIN` without an `ON` condition. ### Example `products (3 rows)` × `colors (2 rows)` -> the result is `6 rows`, where **every product is represented in every color**. This technique is often used deliberately to generate all possible combinations - for example, sizes, dates, parameters, or test data.For the reviewerNote to the moderator (optional)Visible only to the moderator. Helps review go faster.