C-Sharp | Java | Python | Swift | GO | WPF | Ruby | Scala | F# | JavaScript | SQL | PHP | Angular | HTML
SQL Cross JoinWhen each row of first table is combined with each row from the second table, known as Cartesian join or cross join. In general words we can say that SQL CROSS JOIN returns the Cartesian product of the sets of rows from the joined table. We can specify a CROSS JOIN in two ways:
SYNTAX of SQL Cross Join SELECT * FROM [TABLE1] CROSS JOIN [TABLE2] OR SELECT * FROM [ TABLE1] , [TABLE2] Let us take an example of two tables, Table1 - MatchScore
Table2 - Departments
SQL Statement: SELECT * FROM MatchScore CROSS JOIN Departments After executing this query , you will find the following result:
Next TopicSQL Primary Key
|