# Joining Tables

A JOIN puts two related tables back together in one query, matching each product to its vendor with ON and naming columns from both tables through short aliases, and a LEFT JOIN keeps the vendors that have no products yet, with None where a product would be.

![Cheat sheet: Joining Tables](https://fsdtrainingmedia.blob.core.windows.net/public/images/2026/11/1ed758567b67481f8f532f05f9703f41.webp)

- Category: FastAPI
- Level: Journeyman
- Tags: Alias (sql), database, INNER JOIN, join, Join Condition, LEFT OUTER JOIN, sql, sqlite
- Author: Gregor Dzierzon
- Updated: November 23, 2026

Source: https://www.ask-codey.com/cheat-sheets/fastapi-sql-joins-cheat-sheet
