AS Clause


The AS clause allows you to create an “alias” for a column or result.

The AS operator gets executed at the end of a query, so it can’t be used with a HAVING or WHERE statement.

INNER JOINS


An INNER JOIN matches records that are in both tables.


OUTER JOIN


An OUTER JOIN will include all records from both tables. Fields that do not match will be filled with a NULL value.

To find records that are unique to each table you can filter the results for NULL values in the joined fields.


LEFT JOIN


A LEFT JOIN will match values with the left table. If there is no match in the right table a NULL value will be recorded.

To view values that are in the left table only we can filter for NULL values in the right table.

RIGHT JOIN


A RIGHT JOIN is the same as a LEFT JOIN except that the tables are switched.

UNION


UNION allows you to stack the results of multiple select queries.