USING clause
A join shorthand that pairs rows on columns with the same name in both tables, such as USING (category_id).
In more detail
It is fine when both columns really share a name. The course's tables use id on one side and customer_id on the other, so the pairing rule has to be written with ON.
Related terms
- NATURAL JOIN — A join that silently pairs rows on every column the two tables share by name.
- ON clause — The part of a join that states which rows of the two tables belong together.
- join — Combining rows from two tables into one result by pairing rows according to a rule, usually matching keys.
Taught in
- Inner Joins And Table Aliases — PostgreSQL, Indexing & Relational Data Modeling