Select rows from multiple tables
suggest changeSELECT *
FROM
table1,
table2
SELECT
table1.column1,
table1.column2,
table2.column1
FROM
table1,
table2
This is a cross join, the Cartesian product of the two tables. There is no match condition, so every row of table1 is paired with every row of table2. Write CROSS JOIN if that is what you mean.
These statements return the selected columns from multiple tables in one query.
There is no specific relationship between the columns returned from each table.
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents