What is a foreign key?
The primary key from another table. A shared data value between tables.
How do you join two SQL tables?
Select cols
from table
join table using (foreign key)
select *
from “products”
join “suppliers”
on “suppliers”.”id” = “products”.”supplierId”;
if the id names are not identical then you must use a join on to link different id names
How do you temporarily rename columns or tables in a SQL statement?
Use the keyword “as” and place it after the table names and provide an alias. Ex: from “table” as “t”. Do the same with columns after the select keyword.