What is a foreign key?
A FOREIGN KEY is a key used to link two tables together.
A FOREIGN KEY is a field (or collection of fields) in one table that refers to the PRIMARY KEY in another table.
How do you join two SQL tables?
join clause “table name” using (“commoncolumn”)
How do you temporarily rename columns or tables in a SQL statement?
we can alias their names as follows:
select "p"."name" as "product",
"p"."category",
"s"."name" as "supplier",
"s"."state"
from "products" as "p"
join "suppliers" as "s" using ("supplierId");