Select rows from multiple tables

suggest change
SELECT *
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.

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents