Skip to content

SQL JOINS quick tutorial

Table T1, Table T2

INNER JOIN returns only matching rows from T1, T2

LEFT OUTER JOIN returns (all T1 rows) X (matching T1 rows in T2)

RIGHT OUTER JOIN returns (all T2 rows) X (matching T2 rows in T1)

UNION returns only unique rows from T1, and T2.

UNION ALL returns T1+T2 rows

Leave a Reply

Your email address will not be published. Required fields are marked *

ten − 4 =