sql-join Flashcards
1
Q
What is a foreign key?
A
one column word/key that links two separate tables (column found in both tables)
2
Q
How do you join two SQL tables?
A
use the join clause after a from clause followed by the table name you want to join, and then with the using keyword and then the column name (foreign key) with double quotes inside parentheses
3
Q
How do you temporarily rename columns or tables in a SQL statement?
A
use the as keyword to rename; ex: “products” as “p” for renaming tables, and “product”.”name” as “product” for columns (.”name” is original name of column).