SQL CROSS JOIN Last Updated : 21 Nov, 2025 Comments Improve Suggest changes 5 Likes Like Report SQL CROSS JOIN creates a Cartesian product of two tables, meaning it returns every possible combination of rows from both tables. It does not use a join condition, and the total number of rows in the result is the number of rows in the first table multiplied by the number of rows in the second table. It is useful for generating all combinations of data. CROSS JOINSyntax:SELECT * FROM table1CROSS JOIN table2;Examples of SQL CROSS JOINBefore diving into queries, let’s create two sample tables: Customer and Orders. These tables will help us understand how CROSS JOIN combines data into multiple combinations.CustomersOrdersQuery:SELECT * FROM CustomerCROSS JOIN Orders;Output: Explanation: CROSS JOIN combines every row from the Customer table with every row from Orders table. Since there are 2 customers and 2 orders, result contains 2 × 2 = 4 rows. Create Quiz Comment C chitranshjohari17 Follow 5 Improve C chitranshjohari17 Follow 5 Improve Article Tags : SQL Databases mysql SQLmysql SQL-basics DBMS-Join SQL-Query +3 More Explore BasicsWhat is SQL?6 min readSQL Data Types3 min readSQL Operators4 min readSQL Commands | DDL, DQL, DML, DCL and TCL Commands4 min readSQL Database Operations3 min readSQL CREATE TABLE3 min readQueries & OperationsSQL SELECT Query3 min readSQL INSERT INTO Statement4 min readSQL UPDATE Statement3 min readSQL DELETE Statement3 min readSQL - WHERE Clause2 min readAliases in SQL2 min readSQL Joins & FunctionsSQL Joins (Inner, Left, Right and Full Join)4 min readSQL CROSS JOIN1 min readSQL | Date Functions3 min readSQL | String functions6 min readData Constraints & Aggregate FunctionsSQL NOT NULL Constraint2 min readSQL PRIMARY KEY Constraint5 min readSQL Count() Function4 min readSQL SUM() Function2 min readSQL MAX() Function3 min readAVG() Function in SQL2 min readAdvanced SQL TopicsSQL Subquery5 min readWindow Functions in SQL6 min readSQL Stored Procedures7 min readSQL Triggers5 min readSQL Performance Tuning6 min readSQL TRANSACTIONS6 min readDatabase Design & SecurityIntroduction of ER Model9 min readIntroduction to Database Normalization6 min readSQL Injection11 min readSQL Data Encryption5 min readSQL Backup4 min readWhat is Object-Relational Mapping (ORM) in DBMS?7 min read Like