Skip to main content
Database & SQL Tools

SQL JOIN Builder

Visually build an INNER, LEFT, RIGHT, FULL OUTER, or CROSS JOIN between two tables and generate the SQL.

Choose a join type, your two tables, and the columns to join on - this tool generates the matching SQL JOIN clause.

FULL OUTER JOIN isn't supported by every database engine (notably MySQL) - this tool notes that where relevant rather than assuming universal support.

What Does This Tool Generate?

A SQL JOIN clause combining two tables - INNER, LEFT, RIGHT, FULL OUTER, or CROSS - based on the tables and matching columns you specify.

Why Use This Tool?

Remembering which JOIN type keeps unmatched rows from which side (LEFT keeps all left-table rows, RIGHT keeps all right-table rows, INNER keeps only matches) trips people up regularly. This tool generates the correct syntax and briefly explains what each type keeps.

How to Use It

  1. Choose a join type.
  2. Enter your two table names and the columns to join on (e.g. orders.customer_id = customers.id).
  3. Copy the generated SQL.

Limitations

FULL OUTER JOIN is not supported by every database engine - MySQL notably lacks it (a UNION of LEFT and RIGHT JOIN is the common workaround). This tool flags that rather than assuming universal support.

Frequently Asked Questions

INNER JOIN returns only rows with a match in both tables. LEFT JOIN returns every row from the left table, with NULLs where the right table has no match.

No. In MySQL you can simulate it by combining a LEFT JOIN and a RIGHT JOIN with UNION.

If the join column is not unique on one side, each matching row is repeated. A CROSS JOIN, or a missing ON condition, pairs every row with every other row.
Share this tool: