sql-join Flashcards
1
Q
What is a foreign key?
A
A foreign key is column on one table that refers to the values in a specific column in another table.
2
Q
How do you join two SQL tables?
A
With join clause
select *
from “tableName”
join “anotherTable” using (“columnName”)
3
Q
How do you temporarily rename columns or tables in a SQL statement?
A
Using “as” keyword after the column or table names.
ex: select “products”.”name” as “product”