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)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
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).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly